Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Peter,
I was looking at it from the POV of getting some ADSI data corresponding to the individual/login name of the person doing the merge. It is worth investigating and thanks for putting me on the right track. Regards, "Peter Jamieson" wrote: The last time I looked (about 2 years ago) it was possible to use the OLEDB provider for the AD to use AD as a Word mailmerge data source. e.g. in code ActiveDocument.MailMerge,OpenDataSource _ Name:="c:\a\empty.odc", _ Connection:="Provider=ADSDSOObject;", _ SQLStatement:="SELECT * FROM 'LDAP://adsiservername'" where empty.odc is a completely empty file that you can create in e.g. Notepad, and adsiservername is the name of the adsi server box. However, I get the impression that what you want to do is either a. get some ADSI data corresponding to the individual/login name of the person doing the merge or b. get some ADSI data appropriate to the data in each row in another data source. Either way, for the data to appear as a field in the data source, you would have to be able to get the data source to do the ADSI query. If your data source is Jet/Access, you /might/ be able to create a Query that could do that, using a linked table perhaps - I don't know off the top of my head. If your data source is something like SQL Server, you /might/ be able to do the same using an attached table and a View. Otherwise, if it's case (a), you could consider getting the data using ADO in a Word VBA macro each time a merge is done, and either inserting the results directly or stroing them in a way that makes insertion relatively simple, e.g. in a Document Property (insert using { DOCPROPERTY } field or Document Variable (insert using { DOCVARIABLE } field. Peter Jamieson "medix" wrote in message ... Hi, I want to be able to use mail-merge in Word and pull the data for userinfo e.g. Address, Contact telephone, Job designation,etc as stored in the AD and present it as a field for ultimate mail-merge. Most users fail to populate the Userinfo in Word. Any help greatly appreciated. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel as mailmerge data source | Mailmerge | |||
Mailmerge chooses wrong data language | Mailmerge | |||
MailMerge Data Sources | Mailmerge | |||
Mailmerge data source in an Access database will not open | Mailmerge | |||
Mailmerge wont see Added Excel Data source Columns | Mailmerge |