> On Sun, 2 Nov 2008 11:28:28 -0000, "Glenn Rose-Ward" <glenn[ at ]4by2.net>
> wrote:
>
>>I'm using the following code in a piece of Word 2007 vba code
>>The problem is i just ignores my path settings and points the saveas back
>>at
>>my default documents directory, anyone any ideas what i'm doing wrong
>>please
>>?
>>I set the path with
>>
>> Options.DefaultFilePath(wdDocumentsPath) = strClientsPath
>>
>>a few lines earlier in the code and have also tried issuing a
>>ChDir(strClientsPath), still does what it likes :)
>>
>>Dim dlgSaveAs As FileDialog
>>
>>Set dlgSaveAs =
>>Application.FileDialog(FileDialogType:=msoFileDialogSaveAs)
>>
>>dlgSaveAs.InitialFileName = strFileName
>>dlgSaveAs.InitialView = msoFileDialogViewLargeIcons
>>dlgSaveAs.Show
>>dlgSaveAs.Execute
>>
>>ActiveDocument.Close SaveChanges:=False
>>Set dlgSaveAs = Nothing
>
> Forget about changing the default path, and stuff the path into the
> .InitialFileName property of the dialog:
>
> dlgSaveAs.InitialFileName = strClientsPath & "\" & strFileName
>
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ:
http://word.mvps.org> Email cannot be acknowledged; please post all follow-ups to the newsgroup
> so all may benefit.