aayaanmayank
Board Regular
- Joined
- Jul 20, 2018
- Messages
- 157
Hi
can someone suggest what are the changes need to make so below code can work in excel/outlook via html or so. i have found two codes from Microsoft docs.
can someone suggest what are the changes need to make so below code can work in excel/outlook via html or so. i have found two codes from Microsoft docs.
VBA Code:
Sub PictureFormat()
Set myDocument = ActiveDocument
With WrapFormat
Selection.ShapeRange.WrapFormat.Type = wdWrapTopandbottom
End With
End Sub
VBA Code:
Sub PictureFormat()
If Selection.ShapeRange.Count = 0 Then
If Selection.InlineShapes.Count = 1 Then
Selection.InlineShapes(1).ConvertToShape
Else
MsgBox "Select a picture first.", , "Oops!"
Exit Sub
End If
End If
With Selection.ShapeRange(1)
.Top = CentimetersToPoints(0.5)
.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
.Left = CentimetersToPoints(3)
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
With .WrapFormat
.Type = wdWrapTopBottom
.DistanceTop = CentimetersToPoints(0.2)
.DistanceBottom = CentimetersToPoints(0.2)
End With
End With
End Sub