Scooby Doo
10-28-2010, 01:36 PM
I created a document with a User Form attached to it. When the user double clicks on this file, it will create a predefined document and it will show a form that asks the user to enter some information. Once all of the information had been entered into the form, the user would then click on the print button which would take all of the information entered into the User Form and place them into the predefined document at the bookmark locations defined in the predefined document. After this, the predefined document with all of the inputted information would then be sent to the printer for printing.
In a situation when the user has one or more documents already opened and then the user clicks the document with the User Form attached to it, Word will create the new predefined document. Now, there are at least two documents opened. When the user enters all of the required information in the User Form and then click the print button, the user will get a message telling the user that the information can't be transcribed to the predefined document. I assume this problem is due to the fact that the user has several documents opened and Word doesn't know which document to put the entered information in. How can I use VBA to direct Word to place the information in the correct document when the user has several documents open.
Thanks.
:rotlaugh::rotlaugh:
In a situation when the user has one or more documents already opened and then the user clicks the document with the User Form attached to it, Word will create the new predefined document. Now, there are at least two documents opened. When the user enters all of the required information in the User Form and then click the print button, the user will get a message telling the user that the information can't be transcribed to the predefined document. I assume this problem is due to the fact that the user has several documents opened and Word doesn't know which document to put the entered information in. How can I use VBA to direct Word to place the information in the correct document when the user has several documents open.
Thanks.
:rotlaugh::rotlaugh: