View Single Post
 
Old 12-30-2016, 03:50 AM
Daniel Antone Daniel Antone is offline Windows 10 Office 2013
Novice
 
Join Date: Dec 2016
Location: Sydney Australia
Posts: 6
Daniel Antone is on a distinguished road
Default Programmatically make text box borders invisible

I am finding this is a real challenge.
This code supposes to set some properties of a text box. But Word sticks to the manually set defaults for auto shapes even if you try to change the defaults programmatically by using the property "SetShapesDefaultProperties"
Code:
  With Selection.ShapeRange(1)
    With .TextFrame
      .MarginLeft = 0
      .MarginRight = 0
      .MarginTop = 0
      .MarginBottom = 0
    End With
    .LockAnchor = False
    .WrapFormat.Type = wdWrapNone
    .Fill.Visible = msoFalse
    .Line.Visible = msoFalse
  End With
Any suggestions will be greatly appreciated.

Last edited by macropod; 01-01-2017 at 04:36 PM. Reason: Added code tags
Reply With Quote