Thread: [Solved] Formatting picture
View Single Post
 
Old 11-20-2020, 05:44 AM
ksor ksor is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Feb 2018
Location: Århus V, Denmark
Posts: 74
ksor is on a distinguished road
Default Formatting picture

I use this code to format a picture - just a frame around it

Sub FormatPicture()
'
' FormatPicture Makro
'
With Selection
If .InlineShapes.Count <> 1 Then Exit Sub
With .InlineShapes(1)
With .Borders
.Enable = True
.OutsideLineWidth = wdLineWidth300pt <<<<<<<<<<<<<<<< crashes here when stepping through ???
.OutsideLineStyle = wdLineStyleSingle
.OutsideColorIndex = wdBlack
End With
End With
End With
End Sub

but it ONLY works if the picture is "in line with text" !

How can I change it to work on "flowting pictures too ?


EDIT: Too I noticed that the machines freezes/crashes at the marked line when stepping through the code - why

Last edited by ksor; 11-20-2020 at 09:02 AM.
Reply With Quote