Solved

WORDBASIC dialogs GETFILENAME

Posted on 1997-05-26
2
193 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 100 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

717 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