Fillin once fields sometimes filled in twice

W

Walter Briscoe

I am using Word 2003 (11.6359.6360) SP1.

I am having trouble with a merge.

My main document has two { FILLIN "q" \d "d" \o } fields.

Fillin data is acquired in a successful ActiveDocument.Fields.Update.

ActiveDocument.MailMerge.DataSource.Name is unset until I use
ActiveDocument.MailMerge.OpenDataSource to link to a data source.

Dialogs(wdDialogMailMergeRecipients).Show selects the records to merge.

I would like to put a debug probe here but have yet to figure how. I
guess that .Show unintentionally alters ActiveDocument.MailMerge.Fields.

Moving ActiveDocument.Fields.Update to here results in some data being
filled in twice and some being unfilled.

If the number of merged records is more than 7, fillin data for both
fields is again requested during ActiveDocument.MailMerge.Execute.

When debugging, I do not find a Globals window analogous to the Locals
window. The Object Browser seems to deal with the structure of objects
but not object values. It is painful to construct a MsgBox call to show
the members of an object.
 
W

Walter Briscoe

In message <[email protected]> of Thu, 6 Mar 2008
12:13:55 in microsoft.public.word.mailmerge.fields, Walter Briscoe
I am using Word 2003 (11.6359.6360) SP1.

I am having trouble with a merge.

My main document has two { FILLIN "q" \d "d" \o } fields.

Fillin data is acquired in a successful ActiveDocument.Fields.Update.

ActiveDocument.MailMerge.DataSource.Name is unset until I use
ActiveDocument.MailMerge.OpenDataSource to link to a data source.

Dialogs(wdDialogMailMergeRecipients).Show selects the records to merge.

I would like to put a debug probe here but have yet to figure how. I
guess that .Show unintentionally alters ActiveDocument.MailMerge.Fields.

Moving ActiveDocument.Fields.Update to here results in some data being
filled in twice and some being unfilled.

If the number of merged records is more than 7, fillin data for both
fields is again requested during ActiveDocument.MailMerge.Execute.

When debugging, I do not find a Globals window analogous to the Locals
window. The Object Browser seems to deal with the structure of objects
but not object values. It is painful to construct a MsgBox call to show
the members of an object.

I found the following before the .execute call gave me a "fix".
It leaves me wanting an explanation. ;(
ActiveDocument.Fields(1).Unlink ' Stop Fillin going again
ActiveDocument.Fields(2).Unlink ' Stop Fillin going again
ActiveDocument.Fields(3).Unlink ' Stop Fillin going again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top