Jump to content

Macro search for text box formatted to Layout: In line with text


Recommended Posts

Posted

Hi.

I've managed to set up a macro that hides the content of all text boxes in

my document by searching for each text box and setting the contents' font

colour to white. However, it only seems to find text boxes that haven't been

formatted to 'Layout: In line with text'.

Does anybody know way to search for and edit these text boxes as well as the

others?

Here is the code that I am using:

Sub HideAnswers()

' Find each text box and set it's font colour to white

Dim aShape As Shape

For Each aShape In ActiveDocument.Shapes

If aShape.Type = msoTextBox Then

aShape.Select

Selection.Font.Color = wdColorWhite

End If

Next

End Sub

Any help would be really appreciated.

Cheers,

Dan.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...