Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 06-05-2017, 01:31 AM
Guessed's Avatar
Guessed Guessed is offline remove shape fill all text boxes Windows 10 remove shape fill all text boxes Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Shape Type 3 is a chart so I've amended the code to avoid doing anything to them
Code:
Sub EmptyShapes2()
  Dim aShp As Shape, aShp2 As Shape
  On Error GoTo ErrCatcher
  For Each aShp In ActiveDocument.Shapes
    Select Case aShp.Type
      Case msoChart
        'do nothing
      Case msoGroup
        For Each aShp2 In aShp.GroupItems
          If aShp2.TextFrame.HasText Then
            aShp2.Fill.Visible = False
          End If
        Next aShp2
      Case Else
        If aShp.TextFrame.HasText Then
          aShp.Fill.Visible = False
        End If
    End Select
  Next aShp
  Application.ScreenRefresh
  Exit Sub
ErrCatcher:
  aShp.Select
  MsgBox "Error: " & Err.Number & "  " & Err.Description & vbCr & "Shape type: " & aShp.Type
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill / Animate Arc Shape Ds7 PowerPoint 0 05-10-2016 01:53 AM
How to remove all pictures but keep text boxes gn4619 Word VBA 2 10-22-2015 08:19 PM
remove shape fill all text boxes Using variables to fill different boxes snoopo71 PowerPoint 1 12-28-2014 08:43 AM
cropping a picture fill shape Gerbutland PowerPoint 5 04-06-2014 01:23 AM
remove shape fill all text boxes Change accent theme color used as shape fill (not RGBs) preetidb PowerPoint 4 12-30-2013 03:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft