Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

WORDBASIC dialogs GETFILENAME

Posted on 1997-05-26
2
Medium Priority
?
207 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

610 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