savedialog box

Hello,

How do I open a save dialog box for word document to be saved in vb.net desktop app.


Cheers
RIASAsked:
Who is Participating?
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
0
 
RIASAuthor Commented:
Éric Moreau,
Cheers,but wanted it for .doc files.Is there any change in the .txt?
0
 
Éric MoreauSenior .Net ConsultantCommented:
the save dialog won't actually save your file. It is just a way for your program to query the user for a path and a file name. If your app is specifically asking to save a Word document, you should change the Filter property:
o.Filter = "Word Document (*.doc)|*.doc"

Open in new window

0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
RIASAuthor Commented:
Cheers!
0
 
RIASAuthor Commented:
Éric Moreau,
Any changes here :

Select Case o.FilterIndex
                Case 1
                    RichTextBox1.SaveFile(o.FileName, _
                               RichTextBoxStreamType.PlainText)
                Case 2
                    RichTextBox1.SaveFile(o.FileName, _
                               RichTextBoxStreamType.RichText)
            End Select
0
 
Éric MoreauSenior .Net ConsultantCommented:
This is my logic because my sample was saving the content of a richtextbox. What you need to use is the o.FileName which contains the full path selected by the user in the dialog box and use it in your own save mechanism
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.