#1
|
|||
|
|||
Wrap each image behind text
Hi there!
I need to a macro that wrap behind text all shapes of a document (also in headers). I can't figure out how to do it exactly. Thanks.
__________________
Backup your original file before doing any modification. |
#2
|
|||
|
|||
You would start by writing some code!!
The start for the inline and floating shapes in the maintext storyrange is shown below. It is now up to you to extend that to the headers. Code:
Sub ScratchMacro() 'A basic Word macro coded by Greg Maxey Dim oILS As InlineShape Dim oShp As Shape For Each oILS In ActiveDocument.InlineShapes oILS.ConvertToShape Next oILS For Each oShp In ActiveDocument.Shapes oShp.WrapFormat.Type = wdWrapBehind Next oShp lbl_Exit: Exit Sub End Sub |
#3
|
|||
|
|||
Based on your code, this seems to works fine:
Code:
Dim hf As HeaderFooter, oShp As Shape, oSec As Section For Each oSec In ActiveDocument.Sections For Each hf In oSec.Headers If hf.Exists Then For Each oShp In hf.Shapes oShp.WrapFormat.Type = wdWrapBehind Next oShp End If Next hf Next oSec
__________________
Backup your original file before doing any modification. |
#4
|
|||
|
|||
My pleasure.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I animate so: small image ==> large image ==> text over overlaid ==> back to next image | ship69 | PowerPoint | 0 | 09-27-2019 12:55 PM |
Wrap text in text box around image with transparent background | pstidsen | Word | 4 | 02-08-2016 03:30 PM |
Text wrap | chuckmg@acm.org | Word | 6 | 10-01-2013 07:39 PM |
Text Won't Wrap | WRowan | Publisher | 0 | 06-14-2012 09:27 AM |
Cells with wrap text not showing text | lazylew | Excel | 1 | 08-31-2008 06:58 AM |