Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to eliminate the Header Record Delimiters pop up screen

2,844 views
Skip to first unread message

WilliamW

unread,
Sep 14, 2009, 12:57:02 PM9/14/09
to
I am doing a mail merge document using a head file and datasource file with
OpenHeaderSource and OpenDataSource method in the MailMerge object.

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.

Doug Robbins

unread,
Sep 17, 2009, 4:41:23 AM9/17/09
to

Show us the code that you are using.

--
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...

WilliamW

unread,
Sep 17, 2009, 10:31:01 AM9/17/09
to
The code I was using is:

**************************
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

unread,
Sep 17, 2009, 1:57:28 PM9/17/09
to
Try removing the .OpenHeaderSource command altogether. If the headers
are there, .OpenDataSource should pick them up. If they aren't you would
need to point to a different file anyway.


Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv

WilliamW

unread,
Sep 17, 2009, 2:56:03 PM9/17/09
to
Peter:

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.

Peter Jamieson

unread,
Sep 17, 2009, 4:12:02 PM9/17/09
to
Sorry, I failed to spot the pathname differences.

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.

0 new messages