On Monday, February 11, 2013 7:30:42 PM UTC-5, Russell Turner wrote:
> Here's a little bit more of what purpose I'm trying to achieve... My organization wants me to have a word document open upon login to vote for employee of the month each month (no problem, I can just add the right code to an existing login script). They will fill out all of the information and click a command button to submit the file, which stores it in a specified folder on our network. The problem I will run into using this method is that the security settings for our Microsoft Word 2000 is set to high by default. Our average user will not know how to change these settings even if I send out an email to all employees telling them how to change it. It would also be impossible to go to each computer, or even remote into each computer to change it, since we have people across 10 counties logging in 24/7. I would like to be able to add the right code to an existing login script that would change the security settings for Word if possible. We are also using group policy, so that is an option as well
You can instantiate the Word.Application object from a script (VBS or JScript) either as a free standing WSH script or as part of a Hypertext Application (HTA). With it you can add the information provided by the user to the Word document without it actually having to have a macro. Without the macro, it doesn't need to have the Word Macro security setting altered.
An HTA is just an HTML document with an HTA file extension. (There is an HTA tag that supplies additional functionality, but it is optional.) It can be built with the desired fields for the user to fill in/select. Once the user hits a 'Submit' button, the script (derived from the VBA macro code) can then apply the results to the appropriate Word document, though I would think an Excel tabulation might be more appropriate and useful for taking a vote. But that's just my preference.
I also wrote an implementation, called HTABox, that I posted some time ago. It can be accessed from a WSH VBS stand alone script to create a custom dialog box. It could also be used to collect the user information and the script could then put it into the Word document.
Since I don't know what your Word Macro looks like, I can't make any specific suggestions.
___________________________
Tom Lavedas