Consulting

Results 1 to 3 of 3

Thread: SaveAs Dialog pointing to specified folder

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    SaveAs Dialog pointing to specified folder

    I am trying to open the SaveAs dialog to a pre-detemined folder. Cannot seem to get it to work. Here is what I have tried:


    foldername="MacIntosh HD:Users:joedoe:documents:forms:"
    ChDir foldername
    With Dialogs(wdDialogFileSaveAs)
        CloseNum = .Show
    End With
    Invariably it simply opens the last folder opened, and not necessarily the target folder. How can I target the 'target' folder

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,776
    I don't know how to do that, but
    1) you might try without the final colon. (It didn't work for me but I don't use Dir enough to be sure.)

    2) This Excel Macro could be adapted to Word.

    [VBA]Dim myFileName As String

    On Error Resume Next
    myFileName = "False"
    myFileName = MacScript("choose file name default location ""Macintosh HD:Users:mericksonesktop:MailAutomation"" as alias")
    On Error GoTo 0

    If myFileName = "False" Then Exit Sub: Rem cancel
    ThisWorkbook.SaveCopyAs myFileName
    [/VBA]

  3. #3
    Yessssss!!!! Thank you. Only change was last line:

    ActiveDocument.SaveAs MyFileName

    Thanks again.

Posting Permissions

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