(Msg. 1) Posted: Sun Nov 02, 2008 11:28 am
Post subject: FileDialog SaveAs Doesn't Work ? Archived from groups: microsoft>public>word>vba>userforms (more info?)
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
(Msg. 2) Posted: Sun Nov 02, 2008 11:28 am
Post subject: Re: FileDialog SaveAs Doesn't Work ? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
On Sun, 2 Nov 2008 11:28:28 -0000, "Glenn Rose-Ward" <glenn.DeleteThis@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:
--
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.
(Msg. 3) Posted: Wed Nov 12, 2008 9:57 pm
Post subject: Re: FileDialog SaveAs Doesn't Work ? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Thanks Jay that worked !
"Jay Freedman" <jay.freedman RemoveThis @verizon.net> wrote in message
news:k1hrg45230datssjhvg5621h8pkct7nfjh@4ax.com...
> On Sun, 2 Nov 2008 11:28:28 -0000, "Glenn Rose-Ward" <glenn RemoveThis @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.
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum