L
Lee
I have a macro in Excel that opens files and copies and pastes pictures of
various pages into Word. There is a single picture on a page. After the
pictures are pasted in then I need to resize and center the pictures on each
page (the same size for each picture). I'm struggling with a piece of code:
Sub aaa_format()
Dim count As Integer
count = 1
ActiveWindow.ActivePane.VerticalPercentScrolled = 0
Do Until ActiveDocument.Bookmarks("\Sel") = _
ActiveDocument.Bookmarks("\EndOfDoc")
BOEHeight
Loop
End Sub
Sub BOEHeight()
Selection.InlineShapes(1).Height = 450.7
Selection.InlineShapes(1).Width = 581.75
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.MoveDown Unit:=wdLine, count:=1
End Sub
It does not move down correctly. After selecting the first picture, how can
I code this to change the parameters for the selected picture, then move to
the next picture on the next page? It currently will do a few pages but
randomly stops when it does not select a picture.
Is there a way to select all of the pictures and resize all of them at one
time?
Thanks for any help.
various pages into Word. There is a single picture on a page. After the
pictures are pasted in then I need to resize and center the pictures on each
page (the same size for each picture). I'm struggling with a piece of code:
Sub aaa_format()
Dim count As Integer
count = 1
ActiveWindow.ActivePane.VerticalPercentScrolled = 0
Do Until ActiveDocument.Bookmarks("\Sel") = _
ActiveDocument.Bookmarks("\EndOfDoc")
BOEHeight
Loop
End Sub
Sub BOEHeight()
Selection.InlineShapes(1).Height = 450.7
Selection.InlineShapes(1).Width = 581.75
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.MoveDown Unit:=wdLine, count:=1
End Sub
It does not move down correctly. After selecting the first picture, how can
I code this to change the parameters for the selected picture, then move to
the next picture on the next page? It currently will do a few pages but
randomly stops when it does not select a picture.
Is there a way to select all of the pictures and resize all of them at one
time?
Thanks for any help.