04 – Getting the Template Path

Getting the Template Path
When automating Word from Access, we need to know the name and location of the file we will be opening. This information can be hard-coded in VBA such as:
'Ensure Word is visible
WordObj.Visible = True

'gets word path from tblSettings
strWordPath = "C:UsersRobert AustinSkyDriveAXLVideosWordAutomationFilesHotelWelcomeLetter.docx"

WordObj.Documents.Add _
Template:=strWordPath, _

In order to view the rest of this content you will need to register for a premium account. Click here for your free trial.

As always, a site wouldn't be anything without its users so please feel free to comment! We welcome any comments you have on the material and any suggestions you may have for future content.

In our humble opinion, it is worth commenting just so you can play with Fun Captcha below!