The Header Record Delimiters keeps poping up each time the merge is taking
place. Is there a way to prevent this from happening?
Thanks for your attention.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"WilliamW" <Will...@discussions.microsoft.com> wrote in message
news:9A73A406-887E-464B...@microsoft.com...
**************************
Public Sub Document_Open()
With ActiveDocument.MailMerge
.MainDocumentType = wdFormLetters
.OpenHeaderSource Name:="O:\Forms\headers\MPFTWORD.DOC", _
Revert:=False, AddToRecentFiles:=False, ConfirmConversions:=False,
ReadOnly:=True
.OpenDataSource Name:="C:\Forms\Data\MPFTWORD.DOC", _
ConfirmConversions:=False
End With
ActiveDocument.ActiveWindow.View.MailMergeDataView = True
End Sub
**************************
I tried this code with both word 2003 and word 2007.
Thanks for your help.
Peter Jamieson
http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv
The header file and the data file are actually two files in two different
locations, so I would need the OpenDataSource command. From what I can see,
the Header Record Delimiters pops up twice when the document is opened, first
time is when trying to read the head file and the second time is when trying
to the data file, and I have to click OK to clear the popup screen without
doing anything else.
Thanks.
All I know is that
a. as a general principle, separate Header Sources are less likely to
work in recent versions of Word.
b. The rules for Header Sources appear to be different from the rules
for Data Sources - but that's primarily a format issue, i.e. only some
data source formats can also be used as header sources.
c. more recent versions of Word are less likely to be able to guess
the field delimiter you are using in your header source. I can only
guess why that might be the case. However,
- there was a time when duplicating your header source text seemed
to make a difference - i.e. the header source contained one line of text
with (say) commas as field delimiters, copying the first line so you had
two identical lines in the header source seemed to make a difference
- off the top of my head, I cannot remember whether Word insists
that the header source has to have the same delimiter as the data
source. If not, and your header source field delimiter is comma, you
could see if changing that delimiter to a tab makes a difference.