TravisLaborde
IS-IT--Management
I am using Word XP to automate building certain rich documents used by our company. I have built a template document, which uses VBA to get data via RDS from our back end database, and populate the document accordingly. It works fine, but I have four questions regarding enhancements I'd like to make:
1) I have the document saved as a ".dot" file, and when the user opens it, it automatically creates "Document1" based on the template. However, when they save their new document, it still contains the VBA code. Is there a way to cause the save to be "only" the text and not the VBA? I'd like the code to reside in the template only.
2) Just as in #1 above, I'd like the newly saved document to not carry the properties of the template, such as being read only.
3) The VBA auto-runs when the document is opened, and prompts the user for an "account number." Is there a way to "command line" drive this instead? So, instead of entering account # "123" in a prompt, perhaps the document could be opened with command line arguments such as "msword.exe mydocument.dot 123" or something like that?
4) Is there a way to prevent the users from being able to view the VBA code? I know there are hacks out there for protected documents and such, but at least "some" protection would be nice.
Thanks!
Travis
1) I have the document saved as a ".dot" file, and when the user opens it, it automatically creates "Document1" based on the template. However, when they save their new document, it still contains the VBA code. Is there a way to cause the save to be "only" the text and not the VBA? I'd like the code to reside in the template only.
2) Just as in #1 above, I'd like the newly saved document to not carry the properties of the template, such as being read only.
3) The VBA auto-runs when the document is opened, and prompts the user for an "account number." Is there a way to "command line" drive this instead? So, instead of entering account # "123" in a prompt, perhaps the document could be opened with command line arguments such as "msword.exe mydocument.dot 123" or something like that?
4) Is there a way to prevent the users from being able to view the VBA code? I know there are hacks out there for protected documents and such, but at least "some" protection would be nice.
Thanks!
Travis