Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a bit of help putting some code together.

Status
Not open for further replies.

richiwatts

Technical User
Jun 21, 2002
180
GB
I need to make sure that two documents are placed in Words Startup folder. I have been looking around at installers but none of them seem to be able to check which folder Word is using as startup. I have found out that there is a way to do it but it needs to be done with VBA. It would need to be work something like this:

Have a document with a button in it saying something like install. When the user presses the button Word would check for its starup folder location, I believe like this:

Options.DefaultFilePath(wdStartupPath)

And then copy the two files, which are in the same folder as this document to Words Startup folder.

Because someone might have their security options on high they might not be able to run the Macro and would not be warned either.

I was thinking of having a line of text in red under the button saying "If you can see this text your macro security settings are to high. Please change them before you run the installer"

So if there could be a Macro that would run as soon as the document was opened it would turn any red text white, which would mean that the user wouldn't see this warning and could run the macro from the button.

I tried to record a macro but that didn't really work. I would be grateful for some help.

Thanks in advance for any help.
Richi
 
For the startup Folder, Try this

In Word, Tools --> Options --> File Locations --> File Types

startup : C:\Program Files\Microsoft Office\Office\STARTUP

Hope this is what you're looking for.


Arun
 
If you can read the registry, you can look at HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Word\Options\STARTUP-PATH

This is for O97, could be slightly different for other versions of office. There is a module for registry reading & setting called ellreg.bas, but I can't find it at present

HTH ;P
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top