Reply
 
Thread Tools Display Modes
  #1   Report Post  
Rosa
 
Posts: n/a
Default ODC file location


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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I prevent Word from locking the file? Scott Bass New Users 0 October 5th 05 05:20 PM
File - Open - Lookin - FTP location issue Sreekanth Microsoft Word Help 0 October 4th 05 01:32 AM
How do I restore the DEFAULT file location for clipart in Word? We B Good Microsoft Word Help 1 August 19th 05 02:46 PM
Setup for curser location when opening a file Greg Microsoft Word Help 1 May 28th 05 04:35 PM
How to creat relative and shorthand file path names? 2dogs Microsoft Word Help 1 May 15th 05 12:11 PM


All times are GMT +1. The time now is 06:56 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"