A
andreas
Dear Experts:
below macro inserts a drawing canvas at the insertion point. It works
as desired. I now would like the macro to be expanded to process the
following tasks:
1. Any selected shape/graphic is to be checked whether it has the
property: 'floating over text'. If this is not the case the macro
should set this property.
2. the selected graphic is to be cut and pasted into the drawing
canvas that is inserted by running below macro.
Help is much appreciated. Thank you very much in advance for your
professional help. Regards, Andreas
Sub InsertCanvasWidthPrintableArea() ' to be expanded
Dim shpCanvas As Shape
Dim sect As Section
Set sect = Selection.Sections(1)
'Add a new drawing canvas to the active document
Set shpCanvas = ActiveDocument.Shapes.AddCanvas( _
Left:=sect.PageSetup.LeftMargin, _
Top:=75, _
Width:=sect.PageSetup.PageWidth - _
sect.PageSetup.LeftMargin - _
sect.PageSetup.RightMargin, _
Height:=350)
With shpCanvas
.WrapFormat.Type = wdWrapInline
.Fill.Solid
With .Line
.Weight = 0.75
.Style = msoLineSingle
.Visible = msoTrue
.BackColor.RGB = RGB(255, 255, 255)
End With
End With
End Sub
below macro inserts a drawing canvas at the insertion point. It works
as desired. I now would like the macro to be expanded to process the
following tasks:
1. Any selected shape/graphic is to be checked whether it has the
property: 'floating over text'. If this is not the case the macro
should set this property.
2. the selected graphic is to be cut and pasted into the drawing
canvas that is inserted by running below macro.
Help is much appreciated. Thank you very much in advance for your
professional help. Regards, Andreas
Sub InsertCanvasWidthPrintableArea() ' to be expanded
Dim shpCanvas As Shape
Dim sect As Section
Set sect = Selection.Sections(1)
'Add a new drawing canvas to the active document
Set shpCanvas = ActiveDocument.Shapes.AddCanvas( _
Left:=sect.PageSetup.LeftMargin, _
Top:=75, _
Width:=sect.PageSetup.PageWidth - _
sect.PageSetup.LeftMargin - _
sect.PageSetup.RightMargin, _
Height:=350)
With shpCanvas
.WrapFormat.Type = wdWrapInline
.Fill.Solid
With .Line
.Weight = 0.75
.Style = msoLineSingle
.Visible = msoTrue
.BackColor.RGB = RGB(255, 255, 255)
End With
End With
End Sub