Change Word's startup directory via .bat file

Z

zkid

Does anyone know how to change Word's startup folder location through DOS/a
..bat file? I know how to do it through Word VBA, but I need to do this
through an installation file before Word is opened.

Any help would be most appreciated.

Thanks!

zkid
 
S

Steve Yandl

zkid,

I think I'd use a vbs file rather than try to figure out how to do it with a
batch file.

Set objWord = CreateObject("Word.Application")
objWord.StartupPath = "C:\MyStartFolder"
objWord.Quit
Set objWord = Nothing

The text above saved as a vbs file should to the trick. If your
organization has removed file associations for vbs files to prevent malware
attacks, you can launch the script with the command line:
wscript.exe "c:\script\preWdStart.vbs"
assuming you've saved the text as "preWdStart.vbs" into the folder
C:\script.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top