U
ucanalways
Hey people,
I am novice to word VBA programming.
I have a word document and it contains, pictures, charts and canvas
(powerpoint slides).
Currently, I use the following code to center align the pictures and
charts.
Sub test()
Dim dc As Document
Dim ilShp As InlineShape
Set dc = ActiveDocument
For Each ilShp In dc.InlineShapes
If Not ilShp.Type = wdInlineShapeOLEControlObject Then
ilShp.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
End If
Next
End Sub
I trying to write macros to:
1. Center align a canvas
2. Strecth/resize a picture to fit the width of the page while
mainitaing the aspect ratio.
Please let me know the macro for those.
I would really appreciate any help. Thank You.
I am novice to word VBA programming.
I have a word document and it contains, pictures, charts and canvas
(powerpoint slides).
Currently, I use the following code to center align the pictures and
charts.
Sub test()
Dim dc As Document
Dim ilShp As InlineShape
Set dc = ActiveDocument
For Each ilShp In dc.InlineShapes
If Not ilShp.Type = wdInlineShapeOLEControlObject Then
ilShp.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
End If
Next
End Sub
I trying to write macros to:
1. Center align a canvas
2. Strecth/resize a picture to fit the width of the page while
mainitaing the aspect ratio.
Please let me know the macro for those.
I would really appreciate any help. Thank You.