macro to remove the lines around text boxes

Would it be possible to get a macro to remove all the lines around text boxes in a document.  I need to have the lines showing around a text box to enable a picture to be put inside and sized, but once the picture is in place take off the lines.  Instead of selecting each one and going through the process of removing each boxes lines, could a macro do this for me.  I cannot record it, so don't know where to start.  Would be grateful for some help please.
Margaret
Answer
Answer
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oShp As Shape
For Each oShp In ActiveDocument.Shapes
  If oShp.Type = msoTextBox Then
   With oShp
     .Line.Visible = msoFalse
   End With
  End If
Next oShp
End Sub
Greg Maxey
***
Death smiles at us all, but all a man can do is smile back.


For more help with Word visit:
http://gregmaxey.com/word_tips.html

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 322 Applies to: