Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Setting SaveAs Directory (Office 97 sr2)

    I am trying to create a macro.

    A quote document is created in a central location on a server and is then opened for editing.
    My macro saves the active file and then I want to be able to set the drive and folder that a SaveAs box opens with so that the user can save it on his own machine in a set location.

    All quotes are saved in customer folders within the Quotes folder.

    eg L:My DocumentsQuotes<<variable folder>>

    Can I set the location that the SaveAs box opens to as L:My DocumentsQuotes?

    My macro so far:

    Sub Saving()

    ActiveDocument.Save

    ChangeFileOpenDirectory "L:My DocumentsQuotes"

    With Application.Dialogs(wdDialogFileSaveAs)
    .Format = wdFormatDocument
    .Show
    End With

    End Sub
    "Heading for the deep end"

  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: Setting SaveAs Directory (Office 97 sr2)

    Gee, I thought that would work. But not if the document has been saved. Here's a different way. I just tested it a wee bit in Office 2000, so if you find that it doesn't always work, post again:
    <pre>Sub Saving()
    ActiveDocument.Save
    With Application.Dialogs(wdDialogFileSaveAs)
    .Format = wdFormatDocument
    ' Open dialog in specified directory with current file name
    .Name = "L:My DocumentsQuotes" & ActiveDocument.Name
    .Show
    End With
    End Sub</pre>


  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Re: Setting SaveAs Directory (Office 97 sr2)

    Thanks for the help, it worked fine!
    "Heading for the deep end"

Posting Permissions

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