Posted on 2010-01-12
Medium Priority
Last Modified: 2013-11-23
Hi I'd like to save a file in 2 formats.

though I need to know what format the person selected when saving the file

when the save box opens there is a drop down box with lots of file extensions.

if the person selected txt then

if save.ext='txt then
else if save.ext='doc' then

and so on. when the the code is executed.

cos it has a thing for save.filename

has it got one for the extension?
Question by:eNarc
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
LVL 12

Accepted Solution

Hypo earned 1000 total points
ID: 26299151
You have the FilterIndex property of the TSaveDialog which tells you what extension was selected when the dialog was closed...
LVL 38

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 1000 total points
ID: 26299166
just use the filterindex :

if you set the filter property
txt first
doc second

  if SaveDialog1.Execute then
    case SaveDialog1.FilterIndex of
      1: --> txt
      2: --> doc

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month7 days, 20 hours left to enroll

765 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