L
Lars
Hello,
I am developing a template (Report.dot) in MS Word XP. This template
contains a macro that inserts a new page, oriented landscape. The contents of
the header and footer on this page must be rotated and re-positioned on the
right and left edge of the page (using ranges and frames) so that when the
final document is printed and assembled, all headers and footers are
consistent.
My problem is when I try to select and rotate the logos (jpeg images), I get
the following runtime error : "-2147024891 This member cannot be accessed at
this time".
The code I am using is as follows:
Dim rngHeadr As Range
Dim shpLogo As Shape
With ActiveDocument.Sections(intSectionID)
Set rngHeadr = .Headers(wdHeaderFooterPrimary).Range
End With
For Each shpLogo In rngHeadr.ShapeRange
shpLogo.Select ' <- Error occurs here
Selection.ShapeRange.IncrementRotation 90#
Next
Can anyone give me a work-around ? I will be very grateful !
I am developing a template (Report.dot) in MS Word XP. This template
contains a macro that inserts a new page, oriented landscape. The contents of
the header and footer on this page must be rotated and re-positioned on the
right and left edge of the page (using ranges and frames) so that when the
final document is printed and assembled, all headers and footers are
consistent.
My problem is when I try to select and rotate the logos (jpeg images), I get
the following runtime error : "-2147024891 This member cannot be accessed at
this time".
The code I am using is as follows:
Dim rngHeadr As Range
Dim shpLogo As Shape
With ActiveDocument.Sections(intSectionID)
Set rngHeadr = .Headers(wdHeaderFooterPrimary).Range
End With
For Each shpLogo In rngHeadr.ShapeRange
shpLogo.Select ' <- Error occurs here
Selection.ShapeRange.IncrementRotation 90#
Next
Can anyone give me a work-around ? I will be very grateful !