Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
In Word 2000/2003 VBA, I'm processing mail merge docs that may or may
not have header and data sources already attached. I'm attaching other data sources that contain their own header info, so I want to remove any already-attached header source. Is there a way to do this? Calling OpenHeaderSource with "" gives a runtime error. Can't set HeaderSourceName as it's read-only. Thanks! -Christopher |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Try setting .MainDocumentType to wdNotAMergeDocument (of course you lose
all the data source connection info. but it looks as if you are doing that anyway). -- Peter Jamieson http://tips.pjmsn.me.uk "christopher.allen" "at workscape.com" wrote in message ... In Word 2000/2003 VBA, I'm processing mail merge docs that may or may not have header and data sources already attached. I'm attaching other data sources that contain their own header info, so I want to remove any already-attached header source. Is there a way to do this? Calling OpenHeaderSource with "" gives a runtime error. Can't set HeaderSourceName as it's read-only. Thanks! -Christopher |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Based on your tip (thanks!) I looked at the online doc for
MainDocumentType, which says this: "If you set this property for a document that's already a main document, the attached data source is removed." It doesn't specify what to set it to. Since my code already sets it to wdFormLetters after opening, I verified that this really removes the data source, plus it also removes the header source. -Chris Peter Jamieson wrote: Try setting .MainDocumentType to wdNotAMergeDocument (of course you lose all the data source connection info. but it looks as if you are doing that anyway). |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mail Merge With Seperate Source and Header files | Mailmerge | |||
How to detach a photo from Word and send to my pictures | Microsoft Word Help | |||
Detach or change SQL data source for Word template, and other Qs | Mailmerge | |||
How to link a different Mailmerge header source and data source? | Mailmerge | |||
Mail Merge with separate Source Header document | Mailmerge |