There's no such thing as a stupid question, but they're the easiest to answer.


Software Development Software Development
Search Search
Search for:
Tech Support Guy > > >

Visual Basics, Word 2003, macros ... head scratch!


Redtronic's Avatar
Redtronic Redtronic is offline
Member with 1 posts.
Join Date: Apr 2012
Experience: Beginner
23-Apr-2012, 03:00 AM #1
Talking Visual Basics, Word 2003, macros ... head scratch!
Hi! Firstly I'd like to make it clear that I have absolutely no experience with Visual Basic in Word 2003 and therefore if anyone is able to help I would appreciate 'baby-fed instructions'

I have 3 shapes/groups in my document. I have used various macro's to manipulate the colour of all 3 groups, which therefore makes it easier for the user than having to select each group seperately and revise colour.

My problem is that: the user has to be able to have the option to delete one(or more) of the shapes and continue to colour the remaining groups onstage. Currently I'm getting a "Run-time error" which states "The items with the specified name wasn't found". I expect I'll require some sort of "IF" statement?!!

An extract of my script can be seen below:

Sub BlackTopLenses()
' BlackTopLenses Macro
' Macro recorded 28/05/2012 by New User
    ActiveDocument.Shapes("Group 533").Select
    ActiveDocument.Shapes.Range(Array("Group 533", "Rectangle 522")).Select
    ActiveDocument.Shapes.Range(Array("Group 533", "Rectangle 522", _
        "Group 523")).Select
    Selection.ShapeRange.Fill.ForeColor.RGB = RGB(0, 0, 0)
    Selection.ShapeRange.Fill.Visible = msoTrue
End Sub
Any help would be greatly received...
Rollin_Again's Avatar
Member with 4,726 posts.
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Advanced
01-May-2012, 11:06 PM #2
Can you post a sample document?

panric's Avatar
panric panric is offline
Member with 3 posts.
Join Date: May 2012
Experience: Intermediate
07-May-2012, 01:11 AM #3
Hi,I suggest you switch to VB.NET. You can use interop to operate word. That is quite simple, but note that need MS word to be installed on.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

macro, visual basic, word 2003

Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

You Are Using: Server ID
Trusted Website Back to the Top ↑