Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Aug 2002
    Location
    USA
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Counting images in a Word 97 document?

    From FileProperties I can find out how many words and lines are in a Word 97 document. Is there a way to find out how many images are in a Word document and get a list of those images?

    For several months I have been using HTMLTransit to convert a Word 97 document to HTML without problems. The document contains three pie chart images arranged vertically inline. This month the first pie chart was modified in a big way, now HTMLTransit insists on putting out two copies of the third image and it places one of these copies right next to the first image, on the same horizontal line. The Word document does not show this strange behavior. I am thinking that extra image is in the Word document somewhere but is not visible or is covered over by one of the other images. Ideas? Thanks!

    George
    gearl@home.com
    george.earl@ssa.gov

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Counting images in a Word 97 document?

    You can write VBA code to iterate through the images, however you do not need to do that. If you select one of the images and then tab it will rotate through all images (whether visible or obscured) and you will see the handles of the obscured ones. You can then delete, move or whatever.
    David Grugeon
    Brisbane Australia

  3. #3
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Counting images in a Word 97 document?

    No need to iterate through them in code either.

    MsgBox ActiveDocument.Shapes.Count & " is the number of drawn objects"
    MsgBox ActiveDocument.InlineShapes.Count & " is the number of inline shapes"

    Put the above lines in a module, they work fairly well at giving a count. The tab key will not work when the clip art or drawn object is not set to float over text.

    FWIW

  4. #4
    Star Lounger
    Join Date
    Aug 2002
    Location
    USA
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Counting images in a Word 97 document?

    The tabbing through images worked, and guess what? The sumsabidges had a copy of the third image hidden behind the first image! Four hours of debug time to track down this sloppyness. . . Thanks for the help!

    George

Posting Permissions

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