WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

FileDialog SaveAs Doesn't Work ?

 
   Home -> Office -> User Forms RSS
Next:  rotating table used in word  
Author Message
Glenn Rose-Ward

External


Since: Nov 02, 2008
Posts: 1



(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

Options.DefaultFilePath(wdDocumentsPath) = strClientsPath

a few lines earlier in the code and have also tried issuing a
ChDir(strClientsPath), still does what it likes Smile

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
Back to top
Login to vote
Jay Freedman

External


Since: Mar 17, 2004
Posts: 2876



(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 Smile
>
>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.
Back to top
Login to vote
Glenn Rose-Ward

External


Since: Nov 12, 2008
Posts: 1



(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 Smile
>>
>>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.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> User Forms 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
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support