• Word 2003 macro to find out the creation date

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Word 2003 macro to find out the creation date

    Author
    Topic
    #467480

    Hi,

    Can anybody tell me how to pick up the document stats, creation date, last modified date etc within a word macro please.

    Regards

    Mike

    Viewing 3 reply threads
    Author
    Replies
    • #1213838

      Can anybody tell me how to pick up the document stats, creation date, last modified date etc within a word macro please.

      What kinds of statistics? Try these (you can explore further parameters in the help and object browser):

      Code:
      msgbox activedocument.ComputeStatistics(wdStatisticWords)
      msgbox activedocument.BuiltInDocumentProperties(wdpropertytimecreated)
      • #1214097

        What kinds of statistics? Try these (you can explore further parameters in the help and object browser):

        Code:
        msgbox activedocument.ComputeStatistics(wdStatisticWords)
        msgbox activedocument.BuiltInDocumentProperties(wdpropertytimecreated)

        Thanks…. this will do fine

    • #1213885

      Hi Mike,

      Many stats can also be retrieved via fields. For example: CREATEDATE, PRINTDATE, SAVEDATE, NUMWORDS, FILESIZE, AUTHOR, etc, etc. Check out Insert|Field. The DOCPROPERTY field has numerous options too.

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    • #1214099

      Beware that the only meaningful file date&time field is the File Modified/Changed Date/Time.

      See this ancient but still relevant XXCOPY technical article.

      BATcher

      Plethora means a lot to me.

      • #1214190

        Beware that the only meaningful file date&time field is the File Modified/Changed Date/Time.

        Hi BATcher,

        I disagree – strongly. The data returned by Word from the document metadata has little to do with the File Modified/Changed Date/Time recorded by the operating system and represents the document’s history as distinct from the file’s history. The document creation date, for example, reflects the date the document was created (or last saved using File|Save As), which can be much earlier than any date recorded by the operating system – simply because the document was created on a different system before being copied to the one on which it is now stored. Ditto the saved date.

        Cheers,
        Paul Edstein
        [Fmr MS MVP - Word]

    • #1214201

      My error is to assume that Word is obtaining its date information from the file system. Put it down to pure ignorance!

      BATcher

      Plethora means a lot to me.

    Viewing 3 reply threads
    Reply To: Word 2003 macro to find out the creation date

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: