Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / December 2004

Tip: Looking for answers? Try searching our database.

Refresh fields by code - specifically {INCLUDEPICTURE}

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john smith - 13 Dec 2004 12:03 GMT
I have written a VB app that creates images according to their part# (ie
1.jpg, 2.jpg, 3.jpg ...) and stores all of them in a temp folder.
The app then makes a DataDoc.doc (with boring things like PartName, Material
blah blah) and includes the image-path-name, by using {INCLUDEPICTURE
"C:\\TEMP\\{MERGEFIELD PartID}.jpg"}.

If I stop the formletter document before printing - I see the one picture
repeated for each and every label.
I can select All (ctrl-A) and refresh (F9) - and the correct (differing)
pictures merge.  Brilliant!!
How can you refresh INCLUDEPICTURE by using code.  I cannot have the user
doing this each time!

PS Have tried: (with no luck)
With oApp.ActiveDocument.MailMerge
   .Application.Selection.WholeStory
   .Application.Selection.Fields.Update
End With

also tried SENDKEYS  - maybe I had F9 wrong.

TIA
Froggie
Graham Mayor - 13 Dec 2004 12:54 GMT
The code on my web site in the following link should work:
See http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> I have written a VB app that creates images according to their part#
> (ie
[quoted text clipped - 20 lines]
> TIA
> Froggie
john smith - 14 Dec 2004 04:24 GMT
Graham, many thanks - but it does not update the INCLUDEPICTURE field.
The code is very similar to my original -
With oApp.ActiveDocument.MailMerge
   .Application.Selection.WholeStory
   .Application.Selection.Fields.Update
End With

following on with your suggestion - is there an AutoPrint automacro?
In my app, Word is opened, populated, merged, printed and closed.  Dumb user
remains as dumb user.

I tried to insert it in the Labels.dot template - but the 'action' needs to
take place on_Print, not on open, on close etc.

BTW: does the newsgroup get offended if I include a picture/ screen dump
(cropped small)

Tim the Frog
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.