+ Reply to Thread
Results 1 to 4 of 4

changing all text boxes of one fill colour to another colour

Hybrid View

  1. #1
    Registered User
    Join Date
    02-17-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    5

    changing all text boxes of one fill colour to another colour

    Hi.

    Is it possible to change all text boxes of a certain fill colour in Word to another fill colour?


    I've got a large document with hundreds of text boxes of 4 different fill colours and the colour key has changed so need to change the colours and wondered if they was another way of doing it other than one box at a time.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: changing all text boxes of one fill colour to another colour

    Can you post a small example document that illustrates the textbox type and the current and required colours
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    02-17-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: changing all text boxes of one fill colour to another colour

    Have uploaded example page
    Attached Files Attached Files

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: changing all text boxes of one fill colour to another colour

    You did not say which colours should change and to what.

    Try this example which turns the purples red.

    Sub RecolorShapes()
        
        Dim shpTemp As Shape
        Dim lngOrigColour As Long
        Dim lngNewColour As Long
        
        lngOrigColour = 10642560 ' Purple
        lngNewColour = 255 ' Red
        
        For Each shpTemp In ActiveDocument.Shapes
            If shpTemp.Fill.ForeColor.RGB = lngOrigColour Then
                shpTemp.Fill.ForeColor.RGB = lngNewColour
            End If
        Next
        
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1