stubdba
Programmer
- Mar 1, 2013
- 3
Hello
I'm trying to set the shape size of a picture in my header on a landscape page but I just can't get the code to change the size.
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="land"
Selection.Range.InsertAutoText
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.ShapeRange
.Height = 2.79
.Width = 26.6
End With
All I'm wanting to to do is when I insert a landscape page in my document I want to call the autotext for the landscape image (this bits works) and then increase the size of the image from it's portrait size which is 2.78W 18W 32%
Any help would be brilliant as I've spent days trying to get it to work.
I'm trying to set the shape size of a picture in my header on a landscape page but I just can't get the code to change the size.
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="land"
Selection.Range.InsertAutoText
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.ShapeRange
.Height = 2.79
.Width = 26.6
End With
All I'm wanting to to do is when I insert a landscape page in my document I want to call the autotext for the landscape image (this bits works) and then increase the size of the image from it's portrait size which is 2.78W 18W 32%
Any help would be brilliant as I've spent days trying to get it to work.