I have been searching and I found out this code:
objWord.ActiveDocument.SaveAs FileName:="C:\MyPath\" & [MyDocName.doc"
It did not work, it is saying [compile error] [Syntax Error]
I need to save each document using a field value[field name = Company] located under my current form.
Private Sub Command143_Click()
Dim objWord As Word.Application
Set objWord = CreateObject("Word.application")
With objWord
.Visible = True
.Documents.Open ("c:\MyMerge.doc")
.ActiveDocument.Bookmarks("First").Select
.Selection.Text = (CStr(Forms![ALL WOOL]![Vendor]))
End With
objWord.ActiveDocument.SaveAs FileName:="C:\" & [MyMerge.doc"
End Sub
objWord.ActiveDocument.SaveAs FileName:="C:\MyPath\" & [MyDocName.doc"
It did not work, it is saying [compile error] [Syntax Error]
I need to save each document using a field value[field name = Company] located under my current form.
Private Sub Command143_Click()
Dim objWord As Word.Application
Set objWord = CreateObject("Word.application")
With objWord
.Visible = True
.Documents.Open ("c:\MyMerge.doc")
.ActiveDocument.Bookmarks("First").Select
.Selection.Text = (CStr(Forms![ALL WOOL]![Vendor]))
End With
objWord.ActiveDocument.SaveAs FileName:="C:\" & [MyMerge.doc"
End Sub