Re: Macro to resize and center align pictures, charts, canvas in MS Word document
- From: ucanalways@xxxxxxxxx
- Date: Mon, 26 Nov 2007 16:44:36 -0800 (PST)
On Nov 26, 10:43 am, ucanalw...@xxxxxxxxx wrote:
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.
Guys, can anyone please help me to solve my macro problem? Thanks
.
- Follow-Ups:
- Re: Macro to resize and center align pictures, charts, canvas in MS Word document
- From: fumei via OfficeKB.com
- Re: Macro to resize and center align pictures, charts, canvas in MS Word document
- References:
- Prev by Date: Re: Delete or reset values for all custom document properties
- Next by Date: Re: Delete Rows based on information in column
- Previous by thread: Macro to resize and center align pictures, charts, canvas in MS Word document
- Next by thread: Re: Macro to resize and center align pictures, charts, canvas in MS Word document
- Index(es):
Relevant Pages
|