PDA

View Full Version : Open help file



msretenovic
2004-11-16, 04:50 PM
Hi all,

I was hoping someone could tell me how to open help files with VBA. I have a routine that I would like to add a help file to, but I have NO idea how to do this.:confused:

TIA,

Ed Jobe
2004-11-16, 04:59 PM
Do you mean that you've written a custom help file and want to navigate to a specific topic, i.e. context sensitive help?

msretenovic
2004-11-16, 05:01 PM
Yes, I don't know how to do that and would appreciate a push.

Thank you,

Ed Jobe
2004-11-16, 05:09 PM
The hardest part is setting up the helpfile properly. After you've done that, each control on the form has a property to set the file name and context id.
What are you using to create your help file? I'm only familiar with HTMLHelp Workshop.

msretenovic
2004-11-16, 07:47 PM
Ed,

Yes, this is the program that I am using to compile the help files. It's the only one that I know of at this point.

What do I need to do to set the help file up?

Ed Jobe
2004-11-16, 08:11 PM
There are 3 parts to make it work. First you have to create two new files using Notepad. They are C++ header files (*.h). One defines aliases, which is a tag mapping to an html file. The other maps topic ids, which you create, to the aliases. I'll attach an example of each. The second part is including them in your help project. In the project editor, DC on [Alias] or [Map] and add the files. The third part is, in vba, specify the help file and context id in the properties for controls on a form.

msretenovic
2004-11-24, 09:20 PM
Ed,
I really appreciate your help, but I'm having a problem getting my button to call the help file:confused: . I have added the context ID to the HelpContextID property for the button. I have also added the file to the properties for the project. I have also placed the help file in my support path. But, when I click on the button, nothing happens. :banghead:

I would appreciate some more guidance on this.:grin:

And thanks for the help you've given so far.

Ed Jobe
2004-11-29, 05:21 PM
What environment are you working in?

msretenovic
2004-11-29, 07:27 PM
Ed,
I am using AutoCAD 2005.

Thanks again for all of your help so far.

Ed Jobe
2004-11-29, 07:47 PM
So, you mean vba in 05? not a VB exe or dll?

msretenovic
2004-11-29, 08:07 PM
Yes, you are 100% correct! :wink:

Will this make a difference in how to call the help file then? :confused:

Ed Jobe
2004-11-29, 09:42 PM
But, when I click on the button, nothing happens.
I see, now...Think vba! What happens when you click on any button? It fires an OnClick event. Have you written any code for that event? If that's the way you really want to do it, you would have to use a browser method to navigate to the topic's url. What you were supposed to do is assign the context ID to the HelpContextID property of a control on the form. Then when the user hits F1 it navigates to the topic in the help file assigned to the project. However, in my test I just did, it didn't work with a chm. It seems to expect the older format of a Windows Help file (*.hlp).

cparvez
2004-12-06, 10:30 PM
I have been looking for a VBA class tied directly to CAD for years! I'm very excited about this one, however, it may be too late because I just got ask to fill out schedules with attribute data. I need help now, and I know very little to begin with. I can write LISP, and have gotten over the interface a bit but that is as far as I go! Any help would be great.

Ed Jobe
2004-12-08, 04:17 PM
As always, the forum is open. You might want to start your own thread though.