Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-06-2014, 08:24 AM
GezLundy GezLundy is offline How can I use a Macro to automatically update all the pictures in a word doc Windows 7 32bit How can I use a Macro to automatically update all the pictures in a word doc Office 2010 32bit
Novice
How can I use a Macro to automatically update all the pictures in a word doc
 
Join Date: Jun 2014
Posts: 2
GezLundy is on a distinguished road
Default How can I use a Macro to automatically update all the pictures in a word doc

Hi

I am using the include picture function in my mailmerge document to link to a microsoft visual studio report. The report has a parameter which is a mergefield from the word document. I have managed to get the document to merge and to update the first picture successfully using the macro "ActiveDocument.Fields.Update"

The problem i'm having is that when more that one record is merged producing more than 1 picture only the first one is updated and the rest of the pictures are a replica of the first.

I am able to manually update these by pressing "CTRL A" then F9 but i want this to be done in the macro.

Does anyone know if this can be done and if so how?

Many Thanks

Geraint
Reply With Quote
  #2  
Old 06-06-2014, 08:37 AM
jpb103's Avatar
jpb103 jpb103 is offline How can I use a Macro to automatically update all the pictures in a word doc Windows 7 64bit How can I use a Macro to automatically update all the pictures in a word doc Office 2007
Advanced Beginner
 
Join Date: May 2014
Location: Thunder Bay, Ontario
Posts: 58
jpb103 is on a distinguished road
Default

Add this line to the beginning of your code:
Code:
Selection.WholeStory
This is the VBA code for select all (Ctrl+A). If you ever want to see what something you do a lot of looks like in code, just click on "Record Macro" in the "Code" section of the Developer tab and repeat the procedure. Stop recording once you're done and have a look at the code for the macro you just recorded.
Reply With Quote
  #3  
Old 06-06-2014, 04:00 PM
macropod's Avatar
macropod macropod is offline How can I use a Macro to automatically update all the pictures in a word doc Windows 7 32bit How can I use a Macro to automatically update all the pictures in a word doc Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You do the whole lot as part of the mailmerge without the need for any macros. See: https://www.msofficeforums.com/mail-...g-dynamic.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 06-12-2014, 03:23 AM
GezLundy GezLundy is offline How can I use a Macro to automatically update all the pictures in a word doc Windows 7 32bit How can I use a Macro to automatically update all the pictures in a word doc Office 2010 32bit
Novice
How can I use a Macro to automatically update all the pictures in a word doc
 
Join Date: Jun 2014
Posts: 2
GezLundy is on a distinguished road
Default

Hi Macropod,

This has worked perfectly.

Many thanks for your help.

Geraint
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to automatically insert pictures the same size in word 2010 mindblaster Word 2 03-07-2013 11:42 AM
Can Word automatically update figure numbers? gib65 Word 7 02-22-2013 05:52 AM
How can I use a Macro to automatically update all the pictures in a word doc Automatically update dates using a macro matthew544 Word VBA 5 12-06-2011 03:19 AM
How can I use a Macro to automatically update all the pictures in a word doc Can Word automatically update footnotes? gib65 Word 2 08-15-2011 01:46 PM
Automatically update text changes in Word - how do I do it? jonrm Word 2 05-21-2009 08:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft