Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]() I am a good user of Word, but not a programmer, and am struggling with my first VBA project (HELP!). I am setting up a template, which will be stored centrally on a server. Users at 2 locations need to be able to use the template, which is set up as a main document, to be merged with data from an SQL View, through an ODC file stored locally. Users at location 1, store their ODC file in the standard folder: C:\Documents and Settings\User_Name\My Documents\My Data Sources However, users at location 2 have their My Documents folder setup by their administrators to a different location, so that their ODC file is in folder: D:\Data\User_Name\My Documents\My Data Sources For the first set of users I have been running the merge in VBA: ActiveDocument.MailMerge.MainDocumentType = wdNotAMergeDocument ActiveDocument.MailMerge.OpenDataSource name:= _ "C:\Documents and Settings\" & GetUserName & "\My Documents\My Data Sources\connection.odc" _ This works fine, as I have found a routine which returns the user name, but is there a way I can capture the PC default location for My Data Sources? I have found information on capturing the document file location (using wdDialogToolsOptionsFileLocations), however, what if a user sets a different default document file location? I'd be grateful for any suggestions on how I can solve this issue. -- Rosa ------------------------------------------------------------------------ Rosa's Profile: http://www.highdots.com/forums/m1019 View this thread: http://www.highdots.com/forums/t3052055 |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I prevent Word from locking the file? | New Users | |||
File - Open - Lookin - FTP location issue | Microsoft Word Help | |||
How do I restore the DEFAULT file location for clipart in Word? | Microsoft Word Help | |||
Setup for curser location when opening a file | Microsoft Word Help | |||
How to creat relative and shorthand file path names? | Microsoft Word Help |