Hi
I need help please on how to write coding correction part of the VBA excel program for inserting picture position in word 2010. I don't know how to write the absolute position with measurement syntax.
Here is what I need:
My picture size is H=12.75cm by W=19.32cm.
In MS Word page layout setting:
Horizontal
I want it 'Absolute position' = 3.15cm to the right of Page
Vertical
I want it 'Absolute position' = 3.44cm below Page
See my code below:
Thanks you.
Best
Mr Singh
I need help please on how to write coding correction part of the VBA excel program for inserting picture position in word 2010. I don't know how to write the absolute position with measurement syntax.
Here is what I need:
My picture size is H=12.75cm by W=19.32cm.
In MS Word page layout setting:
Horizontal
I want it 'Absolute position' = 3.15cm to the right of Page
Vertical
I want it 'Absolute position' = 3.44cm below Page
See my code below:
Code:
Set aShape = wrdDoc.ActiveWindow.Selection.InlineShapes.AddPicture(Filename:=GraphImage, LinkToFile:=False, SaveWithDocument:=True).ConvertToShape
With aShape
.Height = CentimetersToPoints(12.75)
.Width = CentimetersToPoints(19.32)
.Left = CentimetersToPoints(3.15)
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionPage
.Top = CentimetersToPoints(3.44)
.RelativeVerticalPosition = _
wdRelativeVerticalPositionPage
.Select
End With
Thanks you.
Best
Mr Singh