Solved

savedialog box

Posted on 2016-07-21
6
30 Views
Last Modified: 2016-07-21
Hello,

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


Cheers
0
Comment
Question by:RIAS
  • 3
  • 3
6 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 41722844
0
 

Author Comment

by:RIAS
ID: 41722859
Éric Moreau,
Cheers,but wanted it for .doc files.Is there any change in the .txt?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41722914
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Closing Comment

by:RIAS
ID: 41722920
Cheers!
0
 

Author Comment

by:RIAS
ID: 41722970
É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
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41723003
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

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question