根据组合框中的选择打开给定文档 [英] Open a given document based on selection within combo box
问题描述
好吧,我正在尝试创建一个表单,允许通过在组合框中选择一个选项然后只需一个按钮来打开相关文件来打开某些文档。
我知道如何打开excel文档(或单词等),但不知道如何定义要打开的文档。
Alright, I''m trying to create a form that would allow certain documents to be opened by selecting an option within a combo box and then having a single button to open the pertaining file.
I know how to have it open an excel document (or word, etc.) but do not know how to define which document to open.
推荐答案
我是否对问题进行了模糊处理?如果是这样,请告诉我,以便清除任何含糊不清或一般混淆。
Did I make the issue obfuscated? If so, please let me know so I can clear up any ambiguity or general confusion.
您只能使用您已概述的方法打开文档如果有库该应用程序的参考资料。
可能有一些适用于Notepad&写字板,我不知道。
我会想象使用UNC(通用命名约定)设置文档名称只需将完整引用与引用驱动器字母完全相同引用一个。
我自己也做不了多少。
You can only open up a doc using the method you''ve outlined IF there is a library to reference for that application.
There may well be ones for Notepad & Wordpad, I don''t know.
I would imagine that setting the document name using a UNC (Universal Naming Convention) would comprise simply putting the full ref in quotes exactly as you do with a drive letter referenced one.
Don''t do much of this myself.
你只能打开一个doc使用你已经概述的方法如果有一个库可以参考该应用程序。
可能有一些用于Notepad&写字板,我不知道。
我会想象使用UNC(通用命名约定)设置文档名称只需将完整引用与引用驱动器字母完全相同引用一个。
我自己也不要做太多。
You can only open up a doc using the method you''ve outlined IF there is a library to reference for that application.
There may well be ones for Notepad & Wordpad, I don''t know.
I would imagine that setting the document name using a UNC (Universal Naming Convention) would comprise simply putting the full ref in quotes exactly as you do with a drive letter referenced one.
Don''t do much of this myself.
如果根据我在组合框中选择的内容运行命令怎么样?
如果cboFiles =模型1然后Filename =" c:\ modell1.txt"
ElseIF cboFiles =" Model 2"然后filename =" c:\model2.txt"
否则
结束如果
等......?我怀疑我的结构是否正确,但这种可能性是什么?
What about having it run a command based on what I''ve chosen in a combo box?
IF cboFiles = "Model 1" Then Filename="c:\model1.txt"
ElseIF cboFiles = "Model 2" Then filename="c:\model2.txt"
Else
End If
etc...?? I doubt i''ve structured that properly, but is something like that a possibility?
这篇关于根据组合框中的选择打开给定文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!