Solved

Capture Text in Word Art; Excel 2003

Posted on 2011-03-15
4
329 Views
Last Modified: 2012-05-11
I have a spreadsheet with more than 100 tabs.  The data I need to identify is located in a Word Art graphic at the top of each tab.  I plan to write a loop to go through each tab and look at each word art object, but I can't figure out the code to capture the text in the word art.  Help would be much appreciated.
0
Comment
Question by:SueJStevens
  • 2
  • 2
4 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35142990
This will get you started:

Public Sub ExamineWordArt()

    Dim Worksheet As Worksheet
    Dim Shape As Shape
   
    For Each Worksheet In ThisWorkbook.Worksheets
        For Each Shape In Worksheet.Shapes
            MsgBox Shape.OLEFormat.Object.ShapeRange.TextEffect.Text
        Next Shape
    Next Worksheet

End Sub

Kevin
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 35143004
A refinement to only look at WordArt shapes:

Public Sub ExamineWordArt()

    Dim Worksheet As Worksheet
    Dim Shape As Shape
   
    For Each Worksheet In ThisWorkbook.Worksheets
        For Each Shape In Worksheet.Shapes
            If Shape.Type = msoTextEffect Then
                MsgBox Shape.OLEFormat.Object.ShapeRange.TextEffect.Text
            End If
        Next Shape
    Next Worksheet

End Sub

Kevin
0
 

Author Comment

by:SueJStevens
ID: 35149058
Thank you.  Later on today I'll be able to have time to test this and get you feedback.
0
 

Author Closing Comment

by:SueJStevens
ID: 35166508
Thank you.  This is exactly what I needed!
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question