Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
JimBob JimBob is offline
external usenet poster
 
Posts: 10
Default View Merged Fields

I have a Word template where I want to display merged data before updating.
Currently I'm using:
ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle
but this is only good if the user opens the template and doesn't toggle the
fields codes themself.
Please can someone say what would be the code to ensure the merged data is
display rather than the codes, regardless of how they have saved the template?

Many Thanks
BTW, I'm using Word 2003.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default View Merged Fields

If you were to look at the Help information for the ViewMailMergeFieldCodes,
you would find:

MailMerge.ViewMailMergeFieldCodes Property
True if merge field names are displayed in a mail merge main document. False
if information from the current record is displayed. Read/write Long.
expression.ViewMailMergeFieldCodes
expression An expression that returns a MailMerge object.
Remarks

If the active document isn't a mail merge main document, this property
causes an error. To view merge field names or their results, set the
ShowFieldCodes property to False.
Example

This example displays the mail merge fields in Main.doc.

ActiveDocument.ActiveWindow.View.ShowFieldCodes = False
With Documents("Main.doc")
.Activate
.MailMerge.ViewMailMergeFieldCodes = True
End With

If the active document is set up for a mail merge operation, this example
displays the current record information in the main document.

ActiveDocument.ActiveWindow.View.ShowFieldCodes = False
Set myMerge = ActiveDocument.MailMerge
If myMerge.State = wdMainAndSourceAndHeader Or _
myMerge.State = wdMainAndDataSource Then
myMerge.ViewMailMergeFieldCodes = False
End If



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

"Jimbob" wrote in message
news
I have a Word template where I want to display merged data before updating.
Currently I'm using:
ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle
but this is only good if the user opens the template and doesn't toggle
the
fields codes themself.
Please can someone say what would be the code to ensure the merged data is
display rather than the codes, regardless of how they have saved the
template?

Many Thanks
BTW, I'm using Word 2003.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
View Merged Data aleon Mailmerge 5 April 8th 08 07:56 PM
Unable to Find Merged Fields In Merged Document Joe[_2_] Mailmerge 3 April 2nd 07 08:39 AM
how can i view ALL merged labels vs just the first page? Pam Deshazier, SRHS Mailmerge 1 August 31st 06 06:47 PM
C# --> View Merged data Problem goraya Mailmerge 1 June 18th 05 01:47 PM
View Merged Data button not working AlanMagpie Mailmerge 0 June 10th 05 10:02 PM


All times are GMT +1. The time now is 06:07 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"