![]() |
|
|
|
#1
|
||||
|
||||
|
It's easy enough to use a macro to format all the images so they're 5cm less than the page width or the margin width, then centre them horizontally on the page. For example, if the screen shots have been inserted as floating images:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long, sWdth As Single
With ActiveDocument.Range
With .Sections(1).PageSetup
sWdth = .PageWidth - .LeftMargin - .RightMargin - .Gutter - CentimetersToPoints(5)
End With
For i = 1 To .ShapeRange.Count
With .ShapeRange(i)
.LockAspectRatio = True
.Width = sWdth
.RelativeHorizontalPosition = wdRelativeHorizontalPositionMargin
.Left = wdShapeCenter
End With
Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Hi Paul,
I will try and let you know if my screen shot are aligned or not. Hopefully it doesn't mess up the other formats. Regards Anu |
|
#3
|
|||
|
|||
|
Hi Paul,
I Created document with 4 multi-level steps (1, 1.1, 1.1.1, 1.1.1.1 - 1.1.1.4), at the 4th level step (1.1.1.4, 2.1.1.4, 3.1.1.4 & 4.1.1.4) I have inserted the screen shot. I copied the code you have given and pasted into visual basic, I ran the macro by clicking "Run Sub/UserForm, the screen shot is out of range. Not Sure What is the mistake I am doing in Running Macro. Regards Anu |
|
#4
|
|||
|
|||
|
Hi Paul,
Any suggestion is appreciated. When I ran the macro, it doesn't change the size of screen shots. My screen shots are different sizes in each step. I am willing to attach the document. Regards Anu |
|
#5
|
||||
|
||||
|
Quote:
Quote:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long, sWdth As Single
With ActiveDocument.Range
With .Sections(1).PageSetup
sWdth = .PageWidth - .LeftMargin - .RightMargin - .Gutter - CentimetersToPoints(5)
End With
For i = 1 To .InlineShapes.Count
With .InlineShapes(i)
.LockAspectRatio = True
.Width = sWdth
With .Range.Paragraphs(1)
If Len(.Range.Text) = 2 Then
.LeftIndent = 0
.RightIndent = 0
.Alignment = wdAlignParagraphCenter
End If
End With
End With
Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Long shot about rules and forwarding | species | Outlook | 1 | 05-20-2014 10:12 AM |
Word 2010: "Screen shot" and "Print Screen" and fitting the page boundaries!
|
Jamal NUMAN | Word | 4 | 06-30-2011 05:48 PM |
which controls should i set to make the pasted screen shot fits the boundaries of the
|
Jamal NUMAN | Word | 2 | 06-30-2011 05:40 PM |
Strange Markup - see screen shot
|
benjimon | Word | 1 | 12-05-2010 02:28 PM |
| Cropping an screenshot ( screen shot pasted into word 2007. | aligahk06 | Word | 1 | 10-07-2009 07:12 AM |