I have developed an Access database for my group and am in the process of copying the front-end to everyone's computer. The back-end is on a share drive which is mapped differently by every user.
I have a number of modules used in automating sending data to a Word template. This is the code I use to call the template:
When I run the form locally and click on the button that triggers the merge, everything works fine. The front-end that I use is housed in the same folder as the back-end on the share drive.
My issue arises when I put a copy of the front-end on other user's computers. I re-link the tables so it reflects their mapped share drive, but when I test the population of the Word templates nothing happens. Word opens, but nothing shows. If I go in and hard code the modules so that the path reflects each user's share drive path, everything works.
Why won't Access.CurrentProject.Path work on the other computers?
Thanks.
I have a number of modules used in automating sending data to a Word template. This is the code I use to call the template:
Code:
Dim strMyTemplatePath As String
strMyTemplatePath = Access.CurrentProject.Path & "\Consultant Templates\SOW.dot"
WordObj.Documents.Add Template:=strMyTemplatePath, NewTemplate:=False
When I run the form locally and click on the button that triggers the merge, everything works fine. The front-end that I use is housed in the same folder as the back-end on the share drive.
My issue arises when I put a copy of the front-end on other user's computers. I re-link the tables so it reflects their mapped share drive, but when I test the population of the Word templates nothing happens. Word opens, but nothing shows. If I go in and hard code the modules so that the path reflects each user's share drive path, everything works.
Why won't Access.CurrentProject.Path work on the other computers?
Thanks.