Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Apr 2003
    Location
    Washington, District Of Columbia, USA
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Listing all shape name/values in collection (Word XP)

    I'm working on a group of documents containing multiple checkbox shapes. I'm wanting to go through each document list the shape name and value (true/false) of all shapes in the collection then move to the next document in the specified folder. HansV gave me great help in doing this same type function with bookmarks. Included is what i'm trying to start with. Any help would be appreciated. Thanks much
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Listing all shape name/values in collection (Word XP)

    Check boxes from the Control Toolbox are inline shapes. Try the attached macro.
    Attached Files Attached Files

  3. #3
    Star Lounger
    Join Date
    Apr 2003
    Location
    Washington, District Of Columbia, USA
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Listing all shape name/values in collection (Word XP)

    These are olecontrols added to the documents by;

    With ActiveDocument.Shapes.AddOLEControl( _
    ClassType:="Forms.CheckBox.1", _
    Anchor:=Selection.Range).OLEFormat.Object

    I'm having trouble modifying what you provided to fit that format of shapes. Thanks for the quick response, HansV.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Listing all shape name/values in collection (Word XP)

    Simply change

    Dim shp As InlineShape

    to

    Dim shp As Shape

    and

    For Each shp In doc.InlineShapes

    to

    For Each shp In doc.Shapes

  5. #5
    Star Lounger
    Join Date
    Apr 2003
    Location
    Washington, District Of Columbia, USA
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Listing all shape name/values in collection (Word XP)

    Perfect, HansV. Thanks alot, works great.

  6. #6
    Star Lounger
    Join Date
    Apr 2003
    Location
    Washington, District Of Columbia, USA
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Listing all shape name/values in collection (Word XP)

    I recently figured out that this function returns the inlineshapes in the order they were created in the document and not the order they appear in the document. I just wanted to document this for others. I spent awhile figuring this out, hope to save someone else the time. Thanks again, HansV

Posting Permissions

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