Solved

savedialog box

Posted on 2016-07-21
6
27 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 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
0
 

Author Comment

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

Expert Comment

by:Éric Moreau
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Closing Comment

by:RIAS
Comment Utility
Cheers!
0
 

Author Comment

by:RIAS
Comment Utility
É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 69

Expert Comment

by:Éric Moreau
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now