timnicholls
Technical User
Hi,
I have been working on this for a while and need further input.
I have a merge for an individual document going out to Word via code.
All is working well.
I am having trouble saving the documents path automatically and updating a subform field with the path with each new document for each seperate client.
Non technically, I wish to have a subform that is a document management area for each client.
I wish to save a document/s for a client so I can get back and open it again months/years later.
So on a main form you can select from 10 Word documents in a combobox. The same 10 docs. are available for every client.
One is selected and is opened and merged with all the correct details. On saving/closing, the path of that Word document is allocated to the subform and a title is created so you can always go to that client on the main form and see how many documents they have and you can open it agian and modify it etc.
There are 200 clients (and climbing) and one client may have 50 docs. associated and one may have none.
I do not know how to update the recordset for a new record and place the path
in the proper place. I have it set up to do it manually, you press a button to
open a dialog and find the document after you have saved it to a common folder,
but I would like to automatically save the document and the path at the same time.
(When the document closes)
I think I should be using Application.ActiveDocument.Close to do something after Word closes then Application.ActiveDocument.FullName to get the path of where the document was saved...
To help everybody I have a working demo at
(160K)
All the important code is behind the cmdWord Button I think.
Can I ask a couple of people to have a look?
A couple of demo templates are also included so everything works as it should (so far anyway)
Thanks
Tim
I have been working on this for a while and need further input.
I have a merge for an individual document going out to Word via code.
All is working well.
I am having trouble saving the documents path automatically and updating a subform field with the path with each new document for each seperate client.
Non technically, I wish to have a subform that is a document management area for each client.
I wish to save a document/s for a client so I can get back and open it again months/years later.
So on a main form you can select from 10 Word documents in a combobox. The same 10 docs. are available for every client.
One is selected and is opened and merged with all the correct details. On saving/closing, the path of that Word document is allocated to the subform and a title is created so you can always go to that client on the main form and see how many documents they have and you can open it agian and modify it etc.
There are 200 clients (and climbing) and one client may have 50 docs. associated and one may have none.
I do not know how to update the recordset for a new record and place the path
in the proper place. I have it set up to do it manually, you press a button to
open a dialog and find the document after you have saved it to a common folder,
but I would like to automatically save the document and the path at the same time.
(When the document closes)
I think I should be using Application.ActiveDocument.Close to do something after Word closes then Application.ActiveDocument.FullName to get the path of where the document was saved...
To help everybody I have a working demo at
(160K)
All the important code is behind the cmdWord Button I think.
Can I ask a couple of people to have a look?
A couple of demo templates are also included so everything works as it should (so far anyway)
Thanks
Tim