Document Data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve

    Document Data

    Can anyone tell me how to retrieve the embedded document data (author, owner,
    status, etc) from a Word file.

    Thanks!

    Steve


  • Stephen Lebans

    #2
    Re: Document Data

    From the Word MVP site here:


    Using VBA, how can I get access to the Document Properties of a Word
    file without opening the document?

    Article contributed by Jonathan West


    Microsoft makes an ActiveX DLL available called dsofile.dll, which
    allows you to read & write the document properties of an Office file
    without opening the file in a document editing window. To obtain it, go
    to http://support.microsoft.com/?kbid=224351

    The download includes the DLL itself, plus the source code for a small
    VB5/VB6 project that demonstrates its use. While the VB code can't be
    used unmodified in VBA, looking at it should give you a pretty good idea
    of how to use the DLL.

    In addition, you can download a template called ListProps.dot (by
    clicking on the link) that will use dsofile to list all the Office
    documents in a folder, including whichever of the built-in document
    properties you want to have.

    To run it, proceed as follows.

    1.
    Download and register dsofile.dll using regsvr32.

    2.
    Copy the ListProps template into your Word startup folder.

    3.
    Start Word. A new entry will appear in the Tools menu.

    4.
    Select the entry. In the dialog that appears, select the properties you
    want to include in your list, select the folder you want to have listed,
    and select the template you want to use as the document type for the
    list.


    ListProps then uses dsofile to open each file in turn, get the
    properties, and puts the list into a table. Works with available
    properties of Word, Excel & PowerPoint files.

    --

    HTH
    Stephen Lebans

    Access Code, Tips and Tricks
    Please respond only to the newsgroups so everyone can benefit.


    "Steve" <santus@penn.co m> wrote in message
    news:u7evb.1246 7$Wy4.627@newsr ead2.news.atl.e arthlink.net...[color=blue]
    > Can anyone tell me how to retrieve the embedded document data (author,[/color]
    owner,[color=blue]
    > status, etc) from a Word file.
    >
    > Thanks!
    >
    > Steve
    >
    >[/color]

    Comment

    • Steve

      #3
      Re: Document Data

      Stephen --

      Thank you very much!

      Steve


      "Stephen Lebans" <ForEmailGotoMy .WebSite.-WWWdotlebansdot com@linvalid.co m> wrote
      in message news:PXevb.3299 0$R13.974107@ur sa-nb00s0.nbnet.nb .ca...[color=blue]
      > From the Word MVP site here:
      > http://www.mvps.org/word/FAQs/MacrosVBA/DSOFile.htm
      >
      > Using VBA, how can I get access to the Document Properties of a Word
      > file without opening the document?
      >
      > Article contributed by Jonathan West
      >
      >
      > Microsoft makes an ActiveX DLL available called dsofile.dll, which
      > allows you to read & write the document properties of an Office file
      > without opening the file in a document editing window. To obtain it, go
      > to http://support.microsoft.com/?kbid=224351
      >
      > The download includes the DLL itself, plus the source code for a small
      > VB5/VB6 project that demonstrates its use. While the VB code can't be
      > used unmodified in VBA, looking at it should give you a pretty good idea
      > of how to use the DLL.
      >
      > In addition, you can download a template called ListProps.dot (by
      > clicking on the link) that will use dsofile to list all the Office
      > documents in a folder, including whichever of the built-in document
      > properties you want to have.
      >
      > To run it, proceed as follows.
      >
      > 1.
      > Download and register dsofile.dll using regsvr32.
      >
      > 2.
      > Copy the ListProps template into your Word startup folder.
      >
      > 3.
      > Start Word. A new entry will appear in the Tools menu.
      >
      > 4.
      > Select the entry. In the dialog that appears, select the properties you
      > want to include in your list, select the folder you want to have listed,
      > and select the template you want to use as the document type for the
      > list.
      >
      >
      > ListProps then uses dsofile to open each file in turn, get the
      > properties, and puts the list into a table. Works with available
      > properties of Word, Excel & PowerPoint files.
      >
      > --
      >
      > HTH
      > Stephen Lebans
      > http://www.lebans.com
      > Access Code, Tips and Tricks
      > Please respond only to the newsgroups so everyone can benefit.
      >
      >
      > "Steve" <santus@penn.co m> wrote in message
      > news:u7evb.1246 7$Wy4.627@newsr ead2.news.atl.e arthlink.net...[color=green]
      > > Can anyone tell me how to retrieve the embedded document data (author,[/color]
      > owner,[color=green]
      > > status, etc) from a Word file.
      > >
      > > Thanks!
      > >
      > > Steve
      > >
      > >[/color]
      >[/color]


      Comment

      Working...