Word VBA: Using MsoLineJoinStyle

Chris Macro

Well-known Member
Joined
Nov 2, 2011
Messages
1,345
Office Version
  1. 365
Platform
  1. 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
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,225,665
Messages
6,186,312
Members
453,349
Latest member
neam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top