Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Bnpositive Bnpositive is offline
external usenet poster
 
Posts: 2
Default Auto-Refresh INCLUDEPICTURE Field in Mail Merge Document

I've developed a mail merge document that uses the INCLUDEPICTURE field with
an IF command to display a different logo depending on what company is
represented by the mail merge data.

The mail merge works fine, except that the user has to double-click on the
header section to open it for editing, CTRL+A to select all objects, then F9
to force refresh the object. This tells Microsoft to go look for the graphic
with the path specified.

When the user does this, the graphic refreshes and displays the correct
graphic with no problems. So the path is correct and the include function
works.

The problem is that I don't want to force (or rely on) the user to manually
know how and to complete the task manually.

I want the header to automatically refresh and display the image when the
template loads and before the mail merge is finished and completed.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Auto-Refresh INCLUDEPICTURE Field in Mail Merge Document

That's how it works! You *may* get more consistent results if you use the
following syntax

{ INCLUDEPICTURE "D:\\My Documents\\My Pictures\\{ IF { Mergefield Name } =
"Condition" "Signature1.tif" "Signature2.tif" }" }

and update the field before running the merge to a new document

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Bnpositive wrote:
I've developed a mail merge document that uses the INCLUDEPICTURE
field with an IF command to display a different logo depending on
what company is represented by the mail merge data.

The mail merge works fine, except that the user has to double-click
on the header section to open it for editing, CTRL+A to select all
objects, then F9 to force refresh the object. This tells Microsoft to
go look for the graphic with the path specified.

When the user does this, the graphic refreshes and displays the
correct graphic with no problems. So the path is correct and the
include function works.

The problem is that I don't want to force (or rely on) the user to
manually know how and to complete the task manually.

I want the header to automatically refresh and display the image when
the template loads and before the mail merge is finished and
completed.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Bnpositive Bnpositive is offline
external usenet poster
 
Posts: 2
Default Auto-Refresh INCLUDEPICTURE Field in Mail Merge Document

So there's no way to force the header to auto-refresh itself somehow in a
Macro or VB?

Here's my existing syntax if you want to review it.

{INCLUDEPICTURE
"\\\\ss-vpt\\Viewpoint\\Reports\\SSC\\Graphics\\Logo-Co{MERGEFIELD "JCCo"
}{IF {MERGEFIELD "JCCo" } = 98 {MERGEFIELD "Project"}}.JPG" \d}

"Graham Mayor" wrote:

That's how it works! You *may* get more consistent results if you use the
following syntax

{ INCLUDEPICTURE "D:\\My Documents\\My Pictures\\{ IF { Mergefield Name } =
"Condition" "Signature1.tif" "Signature2.tif" }" }

and update the field before running the merge to a new document

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Bnpositive wrote:
I've developed a mail merge document that uses the INCLUDEPICTURE
field with an IF command to display a different logo depending on
what company is represented by the mail merge data.

The mail merge works fine, except that the user has to double-click
on the header section to open it for editing, CTRL+A to select all
objects, then F9 to force refresh the object. This tells Microsoft to
go look for the graphic with the path specified.

When the user does this, the graphic refreshes and displays the
correct graphic with no problems. So the path is correct and the
include function works.

The problem is that I don't want to force (or rely on) the user to
manually know how and to complete the task manually.

I want the header to automatically refresh and display the image when
the template loads and before the mail merge is finished and
completed.




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Auto-Refresh INCLUDEPICTURE Field in Mail Merge Document

If you update the includetext field(s) before you run the merge then the
merged document should show the correct images.
You can use the update code at http://www.gmayor.com/installing_macro.htm to
force an update.
You could intercept the merge to a new document command and add in the code
to update the fields before merging to a new document e.g.

Sub MailMergeToDoc()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
WordBasic.MailMergeToDoc
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org






Bnpositive wrote:
So there's no way to force the header to auto-refresh itself somehow
in a Macro or VB?

Here's my existing syntax if you want to review it.

{INCLUDEPICTURE
"\\\\ss-vpt\\Viewpoint\\Reports\\SSC\\Graphics\\Logo-Co{MERGEFIELD
"JCCo" }{IF {MERGEFIELD "JCCo" } = 98 {MERGEFIELD "Project"}}.JPG" \d}

"Graham Mayor" wrote:

That's how it works! You *may* get more consistent results if you
use the following syntax

{ INCLUDEPICTURE "D:\\My Documents\\My Pictures\\{ IF { Mergefield
Name } = "Condition" "Signature1.tif" "Signature2.tif" }" }

and update the field before running the merge to a new document

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Bnpositive wrote:
I've developed a mail merge document that uses the INCLUDEPICTURE
field with an IF command to display a different logo depending on
what company is represented by the mail merge data.

The mail merge works fine, except that the user has to double-click
on the header section to open it for editing, CTRL+A to select all
objects, then F9 to force refresh the object. This tells Microsoft
to go look for the graphic with the path specified.

When the user does this, the graphic refreshes and displays the
correct graphic with no problems. So the path is correct and the
include function works.

The problem is that I don't want to force (or rely on) the user to
manually know how and to complete the task manually.

I want the header to automatically refresh and display the image
when the template loads and before the mail merge is finished and
completed.



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
mail merge refresh data joe schmo Mailmerge 4 July 12th 07 09:57 AM
During a mail merge, how do I {IncludePicture} while in an {IF..} Jeff O. Mailmerge 10 May 16th 06 02:05 PM
Word 2003 INCLUDEPICTURE with Merge field inconsistant. Ian Galletly Mailmerge 2 February 23rd 06 03:44 PM
Word 2003 INCLUDEPICTURE with Merge field inconsistant IanG Mailmerge 1 February 23rd 06 01:54 PM
Refresh fields by code - specifically {INCLUDEPICTURE} john smith Mailmerge 2 December 14th 04 04:24 AM


All times are GMT +1. The time now is 05:14 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"