Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Getting Changing FileAttr in VBA (Word 2000)

    I need to do the following:

    Cycle through all the DOC files in My Documents

    If the system "Last modified" file attribute is a particular date:

    a) Get the "Date Last Saved" value from inside the DOC

    [img]/forums/images/smilies/cool.gif[/img] set Last Modified = Date Last Saved

    Is this possible in VBA? I think I have some old code for recursing the dirs, but getting/setting the date I don't have.

    Suggestions?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Getting Changing FileAttr in VBA (Word 2000)

    You want the date from inside Word, in the Properties dialog? I think you need the DSOfile.exe download from MS (Dsofile.exe Lets You Edit Office Document Properties from Visual Basic and ASP (Q224351)).

    The FileSystemObject is no help in setting the date(s): the DateLastAccessed and DateLastModified are read-only properties of the File object. Windows API has SetFileTime. More info at http://www.vbapi.com/ref/s/setfiletime.html.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Getting Changing FileAttr in VBA (Word 2000)

    Has anyone gotten DSOFile to work from within Word 2K?

    I get an error when attempting to import the VB frm. And did not see any VBA example code.

    Thanks

Posting Permissions

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