Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2000 question 2

Status
Not open for further replies.

TheVampire

Programmer
Joined
May 1, 2002
Messages
828
Location
US
Is there any way to change the defaults for when a text box frame is created? As it is now, whenever I create a text box, it automatically comes up with a line around it, and set for no wrap, and to move with the document text.

It's really a PITA to have to select format for each box, and change border to "No Line", "Wrap text Top & Bottom" and uncheck the "Move object with text". My documents sometimes have a LOT of these text boxes.

( The only other way I have around this is to open a second document, and create a TB on it and set it's format, then just copy and paste it whenever I need a new box. This is also a less than perfect solution... )

Also, whenever I paste an image into a TB, and I decide that I don't like that image, how can I delete the image without deleting the TB itself, and having to re-create it again?

Thanks for any help,

Robert
 
Hey Robert,
Check this out. You can run it on demand to format your text boxes. You may need to change some of the settings to suite your specific needs, but it will hit ALL your text boxes.
Code:
Sub FromatTextBoxes()
    Dim sh As Shape
    For Each sh In ActiveDocument.Shapes
        With sh
            With .Fill
                .Visible = msoFalse
                .Solid
                .Transparency = 0#
            End With
            With .Line
                .Weight = 0.75
                .DashStyle = msoLineSolid
                .Style = msoLineSingle
                .Transparency = 0#
                .Visible = msoFalse
            End With
            .LockAspectRatio = msoFalse
            With .TextFrame
                .MarginLeft = 7.2
                .MarginRight = 7.2
                .MarginTop = 3.6
                .MarginBottom = 3.6
                .AutoSize = False
                .WordWrap = True
            End With
            .RelativeHorizontalPosition = wdRelativeHorizontalPositionColumn
            .RelativeVerticalPosition = wdRelativeVerticalPositionParagraph
            .LockAnchor = False
            With .WrapFormat
                .AllowOverlap = True
                .Side = wdWrapBoth
                .DistanceTop = InchesToPoints(0)
                .DistanceBottom = InchesToPoints(0)
                .DistanceLeft = InchesToPoints(0.13)
                .DistanceRight = InchesToPoints(0.13)
                .Type = wdWrapSquare
            End With
        End With
    Next
End Sub
Hope this helps :-) Skip,
Skip@theofficeexperts.com
 
Thanks for the code Skip, I appreciate it!

Robert
 
On your second question, if there is ONLY an image in the TB, then deleting the image deletes the TB. However, if you have at least one text character (even a space), deleting the image will NOT delete the TB.

Hope this helps :-) Skip,
Skip@theofficeexperts.com
 
I've been unable to change the default either , but here's a suggestion that might will help you. After inserting a text box and formatting it to your specifications, with the text box selected, look on the Edit menu for the "Repeat Insert Text Box", or use keystroke Crtl + Y to insert another just like the one selected. It does, however, only repeat the last one you've created. Some limitations--but hopefully helpful. Best of luck!
 
LOL
So many answers...

After you've formatted the textbox like you want a default textbox to be, you right-click it and choose AutoShape Defaults. Of course, it only becomes the default in that document.

(hi skippy!) Anne Troy
Word and Excel Macros
Coming soon: wX
 
Hi, "boss!" Skip,
Skip@theofficeexperts.com
 
Dreamboat,

Well, learn something new every day!

Thanks for the tip!

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top