|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Macro to insert multiple pictures to word to a specific size and text wrap
Evening,
As part of my work, I'm required to compile reports that involve inserting a lot of images from our camera into a word document and putting a caption to each photo (Fig 1, Fig 2 etc.). The resolution from our camera makes the inserted images too big to place two photos + caption into one page, which makes editting a hassle (it actually makes up the majority of the time required to do the report) Currently I have a macro that changes ALL current images in the word doc to a specific size, but this gets annoying because I tend to insert 5-6 images at a time and by the 10th+ image, every time I press that macro it goes through each image and takes a long amount of time. A copy of the macro is show below - Sub PicMacro() Dim pic As Shape For Each pic In ActiveDocument.Shapes With pic .LockAspectRatio = msoTrue If .Width > .Height Then ' horizontal .Height = CentimetersToPoints(11) Else ' vertical .Height = CentimetersToPoints(12) End If End With Next End Sub Is there anyone who can help me write a code where -
Any help would be deeply appreciated. If you need any clarification please let me know. Here is an example of the reports I need to write - |
#2
|
||||
|
||||
My photo gallery add-in will do this, without any need for programming - http://www.gmayor.com/photo_gallery_template.html - it was designed for such an application.
If you want to roll your own, then use a suitably sized unbordered table to hold the images. Images that are larger than a table cell will adapt to the width of that cell.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Thank you very much friend, I will check it out
Have a great day |
#4
|
||||
|
||||
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
need macro insert row under specific data | gogita_79 | Excel Programming | 2 | 09-15-2014 01:48 AM |
Insert input box into macro to allow user to choose multiple text entries | Hoxton118 | Word VBA | 6 | 04-03-2014 12:12 AM |
How to automatically insert pictures the same size in word 2010 | mindblaster | Word | 2 | 03-07-2013 11:42 AM |
Linking: Insert > Pictures to a specific folder location | hockfam | PowerPoint | 0 | 11-08-2012 08:09 PM |
Macro to Insert Text Into Cells Having Multiple Lines | revans611 | Excel Programming | 4 | 10-24-2011 10:15 AM |