Chris Macro
Well-known Member
- Joined
- Nov 2, 2011
- Messages
- 1,345
- Office Version
- 365
- Platform
- Windows
Hi I've been scratching my head on this one. I am using Word 2013 and want to square off the borders instead of have them round. I believe I need to use msoLineJoinMiter but am not sure how to write the code. Below is my macro that is adding a border around all the pictures in my Word document. Here's a link to the MSDN documentation on this. Any help would be much appreciated!!!
Code:
Dim myPic As InlineShapeDim MyAnswer As Integer
'Loop Through All Pictures (aka Inline Shapes) in Document
For Each myPic In ActiveDocument.InlineShapes
'Select Image so user can see what image we are talking about
myPic.Select
'Ask and receive verification from user via Messagebox
MyAnswer = MsgBox("Do you wish to add border to selected image?", vbYesNo, "Add Border")
'See if User wants to add border
If MyAnswer = vbYes Then
AddBorder = Dialog
'Border Thickness
myPic.Line.Weight = 6
'Border Line Style
myPic.Line.Style = msoLineSingle
'Square Edges = MsoLineJoinStyle 'Bevel, Mixed, Round, Miter
'Border Color
myPic.Line.ForeColor.RGB = RGB(45, 44, 42)
End If
Next myPic