Re: Latent Merge Fields
From: Ken (Ken_at_discussions.microsoft.com)
Date: 10/18/04
- Next message: Clifton: "Office 2003 not recognizing Office 2000 mail merge format"
- Previous message: Margaret Aldis: "Re: Conditional Graphics"
- In reply to: Peter Jamieson: "Re: Latent Merge Fields"
- Next in thread: Ken: "Re: Latent Merge Fields"
- Reply: Ken: "Re: Latent Merge Fields"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 18 Oct 2004 06:59:03 -0700
Peter,
Thanks for sharing your extensive insght. I ran your first code fragment,
because I want to permanmently remove the mergefield references and leave
only the "resilts" in the document.
After executing the code, all of the references were removed from the main
text - I gather this is true because I could no longer display the chevron
versions with Word's "View Merged Data' button.
Except those merge fields in the document's header. These merge fields were
not unlinked.
I ran the code against the document in mege Letter form, before converting
to a 'Normal Word Document'.
The ActiveDocument.StoryRanges.Count is 5. And the StoryRanges.StoryType's are
wdMainTextStory
wdFootnoteSeparatorStory
wdFootnoteContinuationSeparatorStory
wdEndnoteSeparatorStory
wdEndnoteContinuationSeparatorStory
Shouldn't there be a wdPrimaryHeaderStory in that collectiion for this
document? Is that why the merge fields are not unlinked rom the header? As
usual I'm confused.
Thanks for you help,
Ken
"Peter Jamieson" wrote:
> What happens is that when you convert to a Normal Word Document, all that
> happens is that the data source and any filter and sort specifications are
> removed. All the merge field are actually still there, and their "preview"
> results will show the values of the data source record that was current at
> the time the conversion occurred.
>
> If you get to that point, then e.g. select any of the fields and press F9,
> you will see the field's name displayed in chevrons (exactly what you see
> may depend on other settings in Tools|Options|View).
>
> When you print or preview, some field types in some parts of the document
> are automatically executed and others are not. The settings
> Tools|Options|Print|Update fields and possibly Tools|Options|Print Update
> links may have a bearing on this (i.e. I am guessing that that may be the
> source of the differences on your customer's systems). In this case, the
> ones in the header/footer are executed and you see the chevron versions cf.
> when you press F9.
>
> If you want to see the /results/ and never the chevron versions, I suggest
> you do e.g.
>
> Dim oStoryRange As Range
> For Each oStoryRange In ActiveDocument.StoryRanges
> oStoryRange.Fields.Unlink
> Next
>
> If you want to see the chevron versions only, perhaps
>
> Dim oStoryRange As Range
> For Each oStoryRange In ActiveDocument.StoryRanges
> oStoryRange.Fields.Execute
> Next
>
> will work (I haven't tried). I don't know how you could leave the chevron
> versions but display the preview results.
>
> --
> Peter Jamieson
>
> "Ken" <Ken@discussions.microsoft.com> wrote in message
> news:AB54870D-DF5E-4C22-BCE6-377A2D222555@microsoft.com...
> > A main docunment is created with Word 2003 mailmerge automation. Before
> > saving the document, its converted from a mailmerge 'Letter' to a 'Normal
> > Word Document' using the Main Document Setup icon on the mailmerge
> toolbar.
> >
> > The associated query is removed from the document and all mailmerge fields
> > are instantiated, except those in headers.
> >
> > Why are the merge field references not removed from a header?
> >
> > This problem does not occur on all of our customer's workstations. Some of
> > the Office 2003 installations remove all merge field references when
> 'Normal
> > Word Document' is selected with the Main Document Setup.
> >
> > Thanks for your help with this problem.
> >
> >
>
>
>
- Next message: Clifton: "Office 2003 not recognizing Office 2000 mail merge format"
- Previous message: Margaret Aldis: "Re: Conditional Graphics"
- In reply to: Peter Jamieson: "Re: Latent Merge Fields"
- Next in thread: Ken: "Re: Latent Merge Fields"
- Reply: Ken: "Re: Latent Merge Fields"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|