Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    Mar 2001
    Location
    Cheltenham, Pennsylvania, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Properties of unopened documents (Word 2000)

    Windows allows me to right-click and examine an unopened Word document's summary properties (such as Title, Subject, etc.) I need to extract that same information using a macro, and can't find the right tool to use. As a workaround I'm opening the document, getting the information, and closing it. But this is clumsy, and offensive to any good coder. I'm sure there must be a way to get the information without opening the document. Any help for a new coder? Thanks.

  2. #2
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Properties of unopened documents (Word 2000)

    <A target="_blank" HREF=http://www.mvps.org/access/modules/mdl0003.htm>Modules: Read Word Document Properties</A>

  3. #3
    Star Lounger
    Join Date
    Mar 2001
    Location
    Cheltenham, Pennsylvania, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Properties of unopened documents (Word 2000)

    Thanks for your (prompt) reply. The article is to the point, but its solution involves opening the document. Part of my problem is caused by a complication: the document whose properties I need to query has an AutoOpen macro. When it is opened by code to extract the needed information, the AutoOpen macro fires. That's one of the reasons that I'm hoping to read the properties from the file without ever using an "open" statement of any kind.

  4. #4
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Properties of unopened documents (Word 2000)

    In that case, you need to run another program to read properties.
    You can create such program, for example, in C++ (see this thread).

    I hope it will help you.

  5. #5
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Properties of unopened documents (Word 2000)

    Hi Larry,

    I think <A target="_blank" HREF=http://support.microsoft.com/default.aspx?scid=kb;EN-US;q224351>DSOfile.Exe/q224351</A> from kaplinb's first link should help you (haven't tried it myself yet, though).

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>Klaus

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Properties of unopened documents (Word 2000)

    There's no way to get information from, or the attributes associated with, a file without OPENing the file.

    Either you do it thru an interface, e.g., via VB or VBA, or you do it by opening the file as a byte stream and vetting the internal structure yourself.

  7. #7
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Properties of unopened documents (Word 2000)

    For some usable code which was posted on the Lounge, see <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=xl&Number=40236&Search= true&Forum=xl&Words=DSO&Match=And&Searchpage=0&Lim it=10&Old=allposts&Main=39959>this post</A> and related thread. I think there's also an article at the MSMVP's Word site but I don't have a link.

    Howard, using the DSO property reader you can indeed read document properties (for many types of files - primarily Office files) without opening the file.

    Gary

  8. #8
    Star Lounger
    Join Date
    Mar 2001
    Location
    Cheltenham, Pennsylvania, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Properties of unopened documents (Word 2000)

    Thanks, Gary. I looked at the DSO property reader, but won't be using it because the application will be used by many users and I don't want to burden them with needing to install and register the DLL.

    I've gotten around the problem by changing strategy, but will continue to investigate. If you see a similar question from me in other forums, feel free to ignore it.

Posting Permissions

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