[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

savedialog box

Posted on 2016-07-21
6
Medium Priority
?
43 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 2000 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month18 days, 19 hours left to enroll

834 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