?
Solved

WORDBASIC dialogs GETFILENAME

Posted on 1997-05-26
2
Medium Priority
?
200 Views
Last Modified: 2012-05-04
I am programming a WordBasic macro for Word 6.0c. In there, I display a custom dialog box to ask the user different options. One of the options is the file name (and path) of a mailing list to where the document has to be send at the end of the macro. Is it possible to provide the user with the 'browse' style to go and look for this filename within the macro dialog?

Thanks in advance,

eric debruyne
european commission
debruer@dg1.cec.be
0
Comment
Question by:debruer
[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
2 Comments
 
LVL 2

Accepted Solution

by:
Llandr earned 200 total points
ID: 1602684
This code shows a dialog box that allows you to open an Excel file. After this it opens the Excel file, I hope this is what you were looking for.


Public Sub MAIN()
Dim x
Dim GetXcelFilename
    Dim dlg As Object: Set dlg = WordBasic.DialogRecord.FileOpen(False)

    WordBasic.CurValues.FileOpen dlg
    dlg.Name = "*.xls"
    x = WordBasic.Dialog.FileOpen(dlg)
    GetXcelFilename = dlg.Name
End Sub

0
 

Author Comment

by:debruer
ID: 1602685
Llandr,
Thanks for commenting. What you suggest doesn't quite work on my Word 6.0c but I manage to make it work. It isn't quite what I want to do though. I don't want to open the file, just want the user to select it and the dialog should leave me the name (and path) of the file to use as a mailing list in our mail-program. Preferably, I would like this browse-operation INSIDE another custom dialog but, since I think this isn't possible, I'd settle for a way to retrieve the filename without Word trying to open it.

Any solutions?

eric
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

752 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