Hello friends, I am back for some other help.
I have some vba which exports data to Word via bookmarks:
<Dim objWord As Object
Set objWord = CreateObject("Word.Application")
objWord.Visible = False
objWord.Documents.Add ("C:\MyDocs\MyTemplate.dot")
objWord.ActiveDocument.Bookmarks("LNAME").Select
objWord.Selection.Text = Me.LNAME
objWord.ActiveDocument.Bookmarks("NAME").Select
objWord.Selection.Text = Me.FNAME
objWord.Visible = True
Set objWord = Nothing>
I was wandering if there is a way to save this Word file directly into the folder in C:\myDocs\My Templates with the name given from the LNAME and FNAME fields.
Thank you
I have some vba which exports data to Word via bookmarks:
<Dim objWord As Object
Set objWord = CreateObject("Word.Application")
objWord.Visible = False
objWord.Documents.Add ("C:\MyDocs\MyTemplate.dot")
objWord.ActiveDocument.Bookmarks("LNAME").Select
objWord.Selection.Text = Me.LNAME
objWord.ActiveDocument.Bookmarks("NAME").Select
objWord.Selection.Text = Me.FNAME
objWord.Visible = True
Set objWord = Nothing>
I was wandering if there is a way to save this Word file directly into the folder in C:\myDocs\My Templates with the name given from the LNAME and FNAME fields.
Thank you