Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Apr 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Name a file automatically using bookmark contents? (Word 97)

    There must be a way to do this, and I'm sure it's not too hard. It would be SO USEFUL!
    I use templates extensively with ASK and REF fields to fill repetitive spots in the reports.
    How can I get the AUTONEW macro which gets all this info to save the file immediately with a filename using the info in the bookmarks?
    e.g. "Smith John 4372 041602.doc" Where 4372 is ID and 041602 is CREATEDATE.
    I've been wanting to do this forever, and I'm sure legions of Loungers would love it, too.
    Thanks!

  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: Name a file automatically using bookmark contents? (Word 97)

    This seems to break down into two parts:

    (1) building a string from bookmark information to be used as the file name; and

    (2) calling the ActiveDocument.SaveAs method if the string looks okay (e.g., it's not blank).

    Other things to think about: duplicate file names, what if someone entered the wrong information in the fields, what if someone entered an illegal character (such as a ).

    Do you want to take a stab at one or more of these items?

Posting Permissions

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