#1
|
|||
|
|||
WORD Macro - import picture - resize - position - page break - loop
Hey guys,
My situation is that I have 8.5×11″ jpg images, named sequentially (Picture_01.jpg...etc) When I insert them in Word, the are imported at 71% of the original size, so I have to manually scale to 100% and then set absolute postion to 0,0cm (top left corner of the page). I'm using these images as backgrounds, each one in a different page. Ideally I would like to have a Macro that does the following: 1 - Import the image 2 - Send it "behind text" 3 - Resize to 100% 4 - Position to TOP/LEFT aligned to the page 5 - Insert a page break 6 - Loop Can someone help me with some code for a Macro that can do some or all of these things? This is the only thing I was able to find online that serves to one of my purposes (Resizing back to 100%) : Sub PictSize() Dim PecentSize As Integer PercentSize = 100 Selection.ShapeRange.ScaleHeight Factor:=(PercentSize / 100), _ RelativeToOriginalSize:=msoCTrue Selection.ShapeRange.ScaleWidth Factor:=(PercentSize / 100), _ RelativeToOriginalSize:=msoCTrue End Sub THANK YOU! |
#2
|
||||
|
||||
Hi Nano07,
See: https://www.msofficeforums.com/drawi...ument-all.html The macro there allows you to browse to a folder containing the images you want to process, then automatically inserts them as per your specs (the only thing I'm not sure of is whether the order of insertion will be correct).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
Cross-posted at: http://www.officekb.com/Uwe/Forum.as...5d31caba3f0uwe
For cross-posting etiquette, please read: http://www.excelguru.ca/node/7
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
buttons to import a picture | rhino4eva | Word | 3 | 10-09-2012 03:19 PM |
Macro for moving one cell down from current position | Johnny thunder | Word VBA | 3 | 04-07-2011 04:44 PM |
Word extra spacing on page break | ellinj | Word | 4 | 03-21-2011 05:12 PM |
Page break middle of table (word 2003) | mujisan | Word Tables | 1 | 06-18-2010 12:05 AM |
Page break inside tables.(word 2003) | englund33 | Word Tables | 1 | 06-15-2010 02:00 AM |