Solved

savedialog box

Posted on 2016-07-21
6
34 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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