How to find location of \AppData\Roaming\Microsoft\Word\STARTUP directory with Visual Basic (to automatically save documents to that directory)

Answered How to find location of \AppData\Roaming\Microsoft\Word\STARTUP directory with Visual Basic (to automatically save documents to that directory)

  • Saturday, July 04, 2009 9:17 PM
     
     
    I am trying to write a simple Visual Basic 2008 installer that copies word macro templates to Word's startup directory. On Vista and 7, that directory is the user's \AppData\Roaming\Microsoft\Word\STARTUP directory. Is there a way that I can programmatically find this directory? I.e. is it safe to say that this directory will almost always be in this location such that I can simply get the user's home directory and then add \AppData\etc.... or is there a registry or something else that I can access to get Word's current standard startup directory?

    Thanks!

All Replies