Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Durham, North Carolina, USA
    Thanked 1 Time in 1 Post

    Converting objects in Word 97 (Word 97/VBA)


    I need to scan all the graphics (defined in this case as any object from another source, such as Excel, PPT, MS Draw, etc.) in a document to see if each was pasted in as a "Picture" or as an object from the original application.

    I've tried doing it using the Shape object, but I'm not sure which Property (if any) will tell me what I need. The Application property always reports that the Application is Word, even if the graphic was pasted as an OLE object. Does anyone have ideas/suggestions/an answer?

    Thanks in advance.


  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Toronto, Ontario, Canada
    Thanked 0 Times in 0 Posts

    Re: Converting objects in Word 97 (Word 97/VBA)

    You are looking for the Shape Type

    In W2K (Sorry can't check in W97, I don't have it installed here) it can be one of the following MsoShapeType constants: msoAutoShape, msoCallout, msoChart, msoComment, msoEmbeddedOLEObject, msoFormControl, msoFreeform, msoGroup, msoLine, msoLinkedOLEObject, msoLinkedPicture, msoMedia, msoOLEControlObject, msoPicture, msoPlaceholder, msoScriptAnchor, msoShapeTypeMixed, msoTable, msoTextBox, or msoTextEffect according to the Help File. Just look up Type from the W97 VBA help.
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: Converting objects in Word 97 (Word 97/VBA)

    If they are Inline, that is, not floating over the text, you can spot them easily by pressing Alt+F9 and looking for INCLUDEPICTURE, LINK, and EMBED fields. In code, you can sift through the Fields collection. However, when these objects are allowed to float in the drawing layer, they are not so readily identified. Hopefully Bryan's suggestion addresses those objects.

Posting Permissions

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