Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Data Source Declaration
Is it possible to identify the path to the datasource in a Word template?
The data is always in the same place, it's just several users put their templates all over the place on the server and I can't be arsed to edit the templates on a per user basis. Thanks, Pete |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Data Source Declaration
Only after you open them in Word.
You could open them all programmatically one by one, examine ActiveDocument.MailMerge.DataSource.Name, (and for future reference you might find it useful to record the following as well) ActiveDocument.MailMerge.DataSource.ConnectString ActiveDocument.MailMerge.DataSource.QueryString ActiveDocument.MailMerge.DataSource.Type (just in case) Then for each one whose datasource needs to change (I don't know how you would work that out), issue: ActiveDocument.Mailmerge.DataSource.Close then issue the OpenDataSource you really want. Trouble is that if the datasource is not where the template expects you probably won't get as far as opening the template. Peter Jamieson "That Bloke" wrote in message ... Is it possible to identify the path to the datasource in a Word template? The data is always in the same place, it's just several users put their templates all over the place on the server and I can't be arsed to edit the templates on a per user basis. Thanks, Pete |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Data Source Declaration
Thanks for the info, Peter. The data will always be in the same place and
everyone uses the same source. It's just I have no control where people put their templates. "Peter Jamieson" wrote in message ... Only after you open them in Word. You could open them all programmatically one by one, examine ActiveDocument.MailMerge.DataSource.Name, (and for future reference you might find it useful to record the following as well) ActiveDocument.MailMerge.DataSource.ConnectString ActiveDocument.MailMerge.DataSource.QueryString ActiveDocument.MailMerge.DataSource.Type (just in case) Then for each one whose datasource needs to change (I don't know how you would work that out), issue: ActiveDocument.Mailmerge.DataSource.Close then issue the OpenDataSource you really want. Trouble is that if the datasource is not where the template expects you probably won't get as far as opening the template. Peter Jamieson "That Bloke" wrote in message ... Is it possible to identify the path to the datasource in a Word template? The data is always in the same place, it's just several users put their templates all over the place on the server and I can't be arsed to edit the templates on a per user basis. Thanks, Pete |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Data Source Declaration
The templates are always pointing to the same data source and the data
source is not being set up by a macro, they should all have the same path embedded in them, barring anomalies suchas use of mapped network drive letters, and UNC pathnames. I don't think they will ever have relative path names but I wouldn't rule it out. Not sure if that helps you but there you go. Peter Jamieson "That Bloke" wrote in message ... Thanks for the info, Peter. The data will always be in the same place and everyone uses the same source. It's just I have no control where people put their templates. "Peter Jamieson" wrote in message ... Only after you open them in Word. You could open them all programmatically one by one, examine ActiveDocument.MailMerge.DataSource.Name, (and for future reference you might find it useful to record the following as well) ActiveDocument.MailMerge.DataSource.ConnectString ActiveDocument.MailMerge.DataSource.QueryString ActiveDocument.MailMerge.DataSource.Type (just in case) Then for each one whose datasource needs to change (I don't know how you would work that out), issue: ActiveDocument.Mailmerge.DataSource.Close then issue the OpenDataSource you really want. Trouble is that if the datasource is not where the template expects you probably won't get as far as opening the template. Peter Jamieson "That Bloke" wrote in message ... Is it possible to identify the path to the datasource in a Word template? The data is always in the same place, it's just several users put their templates all over the place on the server and I can't be arsed to edit the templates on a per user basis. Thanks, Pete |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data Trucated in word merge with excel source | Mailmerge | |||
How do I create a read-only mail merge data source? | Mailmerge | |||
DotNet Data Table as Mail Merge Data Source | Mailmerge | |||
Specific Email Merge w/ Specific Attachements | Mailmerge | |||
Cannot Find Its Data Source | Mailmerge |