I am sick to death of pasting a screen shot into a Word document,
right-clicking on it, selecting format picture, change the size to 3" and
aligning it tight to the right. Does anyone have code for applying these
changes to the currently selected picture? Thanks in advance! -- Sandi

RE: Default formatting for pictures by lf

lf
Fri Mar 09 18:27:05 CST 2007

The macro below may do what you want. It sets the wrapping style of the
selected shape to Tight and the Horizontal alignment to Right - both the
width and height of the shape are set to 3". The shape will be positioned
relative to the margin.

Note:
1. If the wrapping style of the selected shape is "In line with text" when
pasted, you must insert the following code line _before_ the line "Set oShape
=â?¦":

Selection.InlineShapes(1).ConvertToShape

2. If you want to set only the width to 3" and scale the shape
proportionally, change â??msoFalseâ?? to â??msoTrueâ?? in the line : â??
LockAspectRatio = msoFalseâ?? (the â??:Height =â?¦â?? line is without importance
then).


The macro:

Sub ResizeAndPositionScreenDump()

Dim oShape As Shape

Set oShape = Selection.ShapeRange(1)
With oShape
â??Change msoFalse to msoTrue to scale proportionally
.LockAspectRatio = msoFalse
.Width = InchesToPoints(3)
.Height = InchesToPoints(3)
.RelativeHorizontalPosition = wdRelativeHorizontalPositionColumn
.Left = wdShapeRight
.WrapFormat.Type = wdWrapTight
End With

End Sub

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Sandi Vogel" wrote:

> I am sick to death of pasting a screen shot into a Word document,
> right-clicking on it, selecting format picture, change the size to 3" and
> aligning it tight to the right. Does anyone have code for applying these
> changes to the currently selected picture? Thanks in advance! -- Sandi

RE: Default formatting for pictures by SandiVogel

SandiVogel
Mon Mar 12 08:27:00 CDT 2007

Works like a charm! Thanks so muchl

"Lene Fredborg" wrote:

> The macro below may do what you want. It sets the wrapping style of the
> selected shape to Tight and the Horizontal alignment to Right - both the
> width and height of the shape are set to 3". The shape will be positioned
> relative to the margin.
>
> Note:
> 1. If the wrapping style of the selected shape is "In line with text" when
> pasted, you must insert the following code line _before_ the line "Set oShape
> =â?¦":
>
> Selection.InlineShapes(1).ConvertToShape
>
> 2. If you want to set only the width to 3" and scale the shape
> proportionally, change â??msoFalseâ?? to â??msoTrueâ?? in the line : â??
> LockAspectRatio = msoFalseâ?? (the â??:Height =â?¦â?? line is without importance
> then).
>
>
> The macro:
>
> Sub ResizeAndPositionScreenDump()
>
> Dim oShape As Shape
>
> Set oShape = Selection.ShapeRange(1)
> With oShape
> â??Change msoFalse to msoTrue to scale proportionally
> .LockAspectRatio = msoFalse
> .Width = InchesToPoints(3)
> .Height = InchesToPoints(3)
> .RelativeHorizontalPosition = wdRelativeHorizontalPositionColumn
> .Left = wdShapeRight
> .WrapFormat.Type = wdWrapTight
> End With
>
> End Sub
>
> --
> Regards
> Lene Fredborg
> DocTools - Denmark
> www.thedoctools.com
> Document automation - add-ins, macros and templates for Microsoft Word
>
>
> "Sandi Vogel" wrote:
>
> > I am sick to death of pasting a screen shot into a Word document,
> > right-clicking on it, selecting format picture, change the size to 3" and
> > aligning it tight to the right. Does anyone have code for applying these
> > changes to the currently selected picture? Thanks in advance! -- Sandi