Register HelpID via Categories dll

A

Andrew

Hi all,

I'm using Laurent Longre's FunCustomise.dll to create custom
categories and descriptions for functions in an add-in. All works
well but I'm not sure how to get my help topics to show up when the
user clicks the help link from the insert function dialog.

Within Laurent's function definition input sheet there is a spot for
entering HelpID (which I have used) but somewhere I must have to
register or point Excel to the location of the actual help file. My
help file is a .chm file created using Microsoft's free "HTML Help
Workshop". I have created the TopictoFile.h and TopicToID.h entries
and can get the help files to display from my own userform using the
code in the Bullen/Bovey/Green book but just can't link them to the
UDF dialog.

Any help much appreciated as I feel like I am almost there!

Thanks a lot,
Andrew
 
P

Peter T

Assuming your UDFs are in a VBA addin, have you included the path to the chm
in Project Properties, Help FIle Name. If you put the chm in the same folder
as the addin, when you distribute it should maintain the relative path.

Not sure about TopictoFile & TopicToID but I have something like this

Map_define.h
#define IDH_FUNCTIONS 6600

Map_Alias.h
IDH_FUNCTIONS=Functions.html

and in the *.hhp file

[FILES]
Functions.html

[ALIAS]
#include Map_Alias.h

[MAP]
#include Map_define.h

I don't recall if you actually need to complete the HelpID, as described
above with the project properties field completed should work even without
Registering the function with Laurent's dll. However if you think you do
need to complete it then it should be something like this -
"c:\<path>\myHelp.chm!6600"

at least that's what I do when registering UDFs in a VB6 automation addin
using KeepItKool's method.

Regards,
Peter T
 
A

Andrew

Hi Peter,

Thanks a lot for replying. You've responded to several questions
from me in the past months - very much appreciated!

I've been trying different combinations but without success. Have to
go now so will post back tomorrow with some more thoughts.

Thanks again,
Andrew



Assuming your UDFs are in a VBA addin, have you included the path to the chm
in Project Properties, Help FIle Name. If you put the chm in the same folder
as the addin, when you distribute it should maintain the relative path.

Not sure about TopictoFile & TopicToID but I have something like this

Map_define.h
#define IDH_FUNCTIONS 6600

Map_Alias.h
IDH_FUNCTIONS=Functions.html

and in the *.hhp file

[FILES]
Functions.html

[ALIAS]
#include Map_Alias.h

[MAP]
#include Map_define.h

I don't recall if you actually need to complete the HelpID, as described
above with the project properties field completed should work even without
Registering the function with Laurent's dll. However if you think you do
need to complete it then it should be something like this -
"c:\<path>\myHelp.chm!6600"

at least that's what I do when registering UDFs in a VB6 automation addin
using KeepItKool's method.

Regards,
Peter T




I'm using Laurent Longre's FunCustomise.dll to create custom
categories and descriptions for functions in an add-in.  All works
well but I'm not sure how to get my help topics to show up when the
user clicks the help link from the insert function dialog.
Within Laurent's function definition input sheet there is a spot for
entering HelpID (which I have used) but somewhere I must have to
register or point Excel to the location of the actual help file.  My
help file is a .chm file created using Microsoft's free "HTML Help
Workshop".  I have created the TopictoFile.h and TopicToID.h entries
and can get the help files to display from my own userform using the
code in the Bullen/Bovey/Green book but just can't link them to the
UDF dialog.
Any help much appreciated as I feel like I am almost there!
Thanks a lot,
Andrew- Hide quoted text -

- Show quoted text -
 
A

Andrew

Hi Peter,

Here's what I've tried and where I'm at:

I have set the path the chm file in project properties. However, I
only expect that to affect the help provided by the function sitting
under the "User defined functions" category. If I understand/
remember correctly the function displayed in my custom category is
actually a function from the dll - it's only when it gets inserted
into the workbook that it uses the VBA function. So I think the help
file needs to be set by the dll (ie. defined in Laurent's sheet) not
just in the VBA project.

Anyway, I tried setting the help ID via Application.MacroOptions just
incase that worked. Even when accesesing via the "User defined
functions" category I get an error message, "Error opening MSHelp".
Not sure if that's due to a conflict with the dll help link.

If I enter the Help ID in Laurent's sheet as "c:\...
\ConverUnitsHelp.chm!102" then the help app tries to open but just
shows a blank page. Curiously, if I don't have the quotes around the
entry (which I assume was what was intended) then everything hangs and
eventually I get the message, "Not enought memory...". If I include
the quotes then it doesn't hang but I still just get a blank help
page.

If I just enter teh ID in Laurent's sheet, ie. 102 then I get a
message: "Help reference not valid" and then "No help available". I
suspect this is probably coming from the .dll itself.

It almost looks like there something wrong with my ID and file mapping
but I think I'm using the same mapping as you - except with different
file names (I just used the names in the book), ie.

[FILES]
ConvertUnit.htm

[ALIAS]
#include TopicToID.h

[MAP]
#include TopicToFile.h

where TopicToID.h contains:
ConvertUnit=ConvertUnit.htm

and TopicToFile.h contains:
#define ConvertUnit 102

Not sure if I'm missing something or you have any other suggestions to
try?

Thanks again,
Andrew
 
P

Peter T

I recall getting to grips with chm being a very frustrating experience!

I completely forgot to say to do this (if you haven't already) -

In Object browser (F2), select your project in the list of libraries
In Classes select the module with the UDFs
Right click on a UDF, Properties
In Help Context ID enter your ID, eg 102

With the 'Help file name' in project properties test if you get the help
before registering the DLL
If that works now register the DLL and try from the Custom category, does it
work?
If not include the full path as before in the HelpID field.

If it didn't even work unregistered maybe there's something wrong with the
chm. Try calling the id using the Help API (more learning !)

Regards,
Peter T
 
A

Andrew

I got there. The systematic approach worked in the end - Thanks!

I think with all my playing around I must have slightly corrupted the
workbook as I couldn't even get the simple MacroOptions help to
display. I copied my code modules to a new workbook via notepad and
then was able to get the basic version working. After that no problem
with Laurent's custom categories approach either. Along the way I did
learn a couple of things which I'll summarise here in case anyone
picks up this post in the future:

The built-in Excel method:
1) You must specify the full path (Project properties dialog) not just
the file name. Excel doesn't look for your help file in the same
folder as the workbook
2) The path to the help file that you specify will not automatically
update if you relocate the workbook and help file to another folder.
In most cases you can't guarantee where a user might store the add-in
so you're probably best to set the path via code at run time,
Application.MacroOptions
3) I couldn't get the HelpID to persist after entering it via the
ObjectBrowser (kept resetting to 0). Setting via
Application.MacroOptions worked

The "Longre method":
1) The help file and topic ID provided via the VB Editor is completely
separate from that provided via Laurent's dll. Help set via the VB
Editor will only show up when your function is accessed via the
UserDefined category (not the category defined by the Longre method).
To illustrate this you can specify different help files for the same
function via the two different approaches. The reason for this is
that they aren't really the same function until they get inserted into
the workbook.
2) You must include the full path in the HelpID field not just the ID
number (ie. as per Peter's post path/filename.chm!100). This follows
from point 1.
3) You can't have any spaces in the name of the help file. Spaces in
the path are okay but not in the name. I tried quotes (both double
and single around the HelpID field) but neither worked

And I guess finally, because I just began to wonder why all this was
so important - it's because the Longre method lets you specify
descriptions for each of your functions parameters. All the rest
(custom categories, link to help file) can be done just using
Application.MacroOptions. Custom descriptions can be provided in
xl2010 but most users don't have that yet.

Hope this is of help to someone one day.

Thanks again Peter.

Cheers,
Andrew

I recall getting to grips with chm being a very frustrating experience!

I completely forgot to say to do this (if you haven't already) -

In Object browser (F2), select your project in the list of libraries
In Classes select the module with the UDFs
Right click on a UDF, Properties
In Help Context ID enter your ID, eg 102

With the 'Help file name' in project properties test if you get the help
before registering the DLL
If that works now register the DLL and try from the Custom category, doesit
work?
If not include the full path as before in the HelpID field.

If it didn't even work unregistered maybe there's something wrong with the
chm. Try calling the id using the Help API (more learning !)

Regards,
Peter T




Hi Peter,
Here's what I've tried and where I'm at:
I have set the path the chm file in project properties.  However, I
only expect that to affect the help provided by the function sitting
under the "User defined functions" category.  If I understand/
remember correctly the function displayed in my custom category is
actually a function from the dll - it's only when it gets inserted
into the workbook that it uses the VBA function.  So I think the help
file needs to be set by the dll (ie. defined in Laurent's sheet) not
just in the VBA project.
Anyway, I tried setting the help ID via Application.MacroOptions just
incase that worked.  Even when accesesing via the "User defined
functions" category I get an error message, "Error opening MSHelp".
Not sure if that's due to a conflict with the dll help link.
If I enter the Help ID in Laurent's sheet as "c:\...
\ConverUnitsHelp.chm!102" then the help app tries to open but just
shows a blank page.  Curiously, if I don't have the quotes around the
entry (which I assume was what was intended) then everything hangs and
eventually I get the message, "Not enought memory...".  If I include
the quotes then it doesn't hang but I still just get a blank help
page.
If I just enter teh ID in Laurent's sheet, ie. 102 then I get a
message: "Help reference not valid" and then "No help available".  I
suspect this is probably coming from the .dll itself.
It almost looks like there something wrong with my ID and file mapping
but I think I'm using the same mapping as you - except with different
file names (I just used the names in the book), ie.
[FILES]
ConvertUnit.htm

[ALIAS]
#include TopicToID.h
[MAP]
#include TopicToFile.h
where TopicToID.h contains:
ConvertUnit=ConvertUnit.htm
and TopicToFile.h contains:
#define ConvertUnit  102
Not sure if I'm missing something or you have any other suggestions to
try?
Thanks again,
Andrew- Hide quoted text -

- Show quoted text -
 
P

Peter T

Thanks for the feedback. Think I know most of that though I'll look again at
the path update (I thought it did but could be wrong) and didn't know about
spaces in the help file name being a problem (I've never had a help file
with spaces in it). Seems odd thought that it's only the file name that
cause a problem but not the path. Did you try apostrophes.

Anyway, I'll keep a note of your comments. Glad you got it all sorted out.

Regards,
Peter T

I got there. The systematic approach worked in the end - Thanks!

I think with all my playing around I must have slightly corrupted the
workbook as I couldn't even get the simple MacroOptions help to
display. I copied my code modules to a new workbook via notepad and
then was able to get the basic version working. After that no problem
with Laurent's custom categories approach either. Along the way I did
learn a couple of things which I'll summarise here in case anyone
picks up this post in the future:

The built-in Excel method:
1) You must specify the full path (Project properties dialog) not just
the file name. Excel doesn't look for your help file in the same
folder as the workbook
2) The path to the help file that you specify will not automatically
update if you relocate the workbook and help file to another folder.
In most cases you can't guarantee where a user might store the add-in
so you're probably best to set the path via code at run time,
Application.MacroOptions
3) I couldn't get the HelpID to persist after entering it via the
ObjectBrowser (kept resetting to 0). Setting via
Application.MacroOptions worked

The "Longre method":
1) The help file and topic ID provided via the VB Editor is completely
separate from that provided via Laurent's dll. Help set via the VB
Editor will only show up when your function is accessed via the
UserDefined category (not the category defined by the Longre method).
To illustrate this you can specify different help files for the same
function via the two different approaches. The reason for this is
that they aren't really the same function until they get inserted into
the workbook.
2) You must include the full path in the HelpID field not just the ID
number (ie. as per Peter's post path/filename.chm!100). This follows
from point 1.
3) You can't have any spaces in the name of the help file. Spaces in
the path are okay but not in the name. I tried quotes (both double
and single around the HelpID field) but neither worked

And I guess finally, because I just began to wonder why all this was
so important - it's because the Longre method lets you specify
descriptions for each of your functions parameters. All the rest
(custom categories, link to help file) can be done just using
Application.MacroOptions. Custom descriptions can be provided in
xl2010 but most users don't have that yet.

Hope this is of help to someone one day.

Thanks again Peter.

Cheers,
Andrew

I recall getting to grips with chm being a very frustrating experience!

I completely forgot to say to do this (if you haven't already) -

In Object browser (F2), select your project in the list of libraries
In Classes select the module with the UDFs
Right click on a UDF, Properties
In Help Context ID enter your ID, eg 102

With the 'Help file name' in project properties test if you get the help
before registering the DLL
If that works now register the DLL and try from the Custom category, does
it
work?
If not include the full path as before in the HelpID field.

If it didn't even work unregistered maybe there's something wrong with the
chm. Try calling the id using the Help API (more learning !)

Regards,
Peter T




Hi Peter,
Here's what I've tried and where I'm at:
I have set the path the chm file in project properties. However, I
only expect that to affect the help provided by the function sitting
under the "User defined functions" category. If I understand/
remember correctly the function displayed in my custom category is
actually a function from the dll - it's only when it gets inserted
into the workbook that it uses the VBA function. So I think the help
file needs to be set by the dll (ie. defined in Laurent's sheet) not
just in the VBA project.
Anyway, I tried setting the help ID via Application.MacroOptions just
incase that worked. Even when accesesing via the "User defined
functions" category I get an error message, "Error opening MSHelp".
Not sure if that's due to a conflict with the dll help link.
If I enter the Help ID in Laurent's sheet as "c:\...
\ConverUnitsHelp.chm!102" then the help app tries to open but just
shows a blank page. Curiously, if I don't have the quotes around the
entry (which I assume was what was intended) then everything hangs and
eventually I get the message, "Not enought memory...". If I include
the quotes then it doesn't hang but I still just get a blank help
page.
If I just enter teh ID in Laurent's sheet, ie. 102 then I get a
message: "Help reference not valid" and then "No help available". I
suspect this is probably coming from the .dll itself.
It almost looks like there something wrong with my ID and file mapping
but I think I'm using the same mapping as you - except with different
file names (I just used the names in the book), ie.
[FILES]
ConvertUnit.htm

[ALIAS]
#include TopicToID.h
[MAP]
#include TopicToFile.h
where TopicToID.h contains:
ConvertUnit=ConvertUnit.htm
and TopicToFile.h contains:
#define ConvertUnit 102
Not sure if I'm missing something or you have any other suggestions to
try?
Thanks again,
Andrew- Hide quoted text -

- Show quoted text -
 
M

Miguel Enrique Tello Leyva

Hello Romina.
I have a question.

Do You had succes with the use of Addin Funcustomize Laurent Longre. You will can your file help of your UDF, when you do click in the point.


Hi all,

I am using Laurent Longre's FunCustomise.dll to create custom
categories and descriptions for functions in an add-in. All works
well but I am not sure how to get my help topics to show up when the
user clicks the help link from the insert function dialog.

Within Laurent's function definition input sheet there is a spot for
entering HelpID (which I have used) but somewhere I must have to
register or point Excel to the location of the actual help file. My
help file is a .chm file created using Microsoft's free "HTML Help
Workshop". I have created the TopictoFile.h and TopicToID.h entries
and can get the help files to display from my own userform using the
code in the Bullen/Bovey/Green book but just cannot link them to the
UDF dialog.

Any help much appreciated as I feel like I am almost there!

Thanks a lot,
Andrew
On Tuesday, May 25, 2010 5:19 AM Peter T wrote:
Assuming your UDFs are in a VBA addin, have you included the path to the chm
in Project Properties, Help FIle Name. If you put the chm in the same folder
as the addin, when you distribute it should maintain the relative path.

Not sure about TopictoFile & TopicToID but I have something like this

Map_define.h

Map_Alias.h
IDH_FUNCTIONS=Functions.html

and in the *.hhp file

[FILES]
Functions.html

[ALIAS]

[MAP]

I do not recall if you actually need to complete the HelpID, as described
above with the project properties field completed should work even without
Registering the function with Laurent's dll. However if you think you do
need to complete it then it should be something like this -
"c:\<path>\myHelp.chm!6600"

at least that is what I do when registering UDFs in a VB6 automation addin
using KeepItKool's method.

Regards,
Peter T
On Wednesday, May 26, 2010 12:18 PM Andrew wrote:
Hi Peter,

Here is what I have tried and where I am at:

I have set the path the chm file in project properties. However, I
only expect that to affect the help provided by the function sitting
under the "User defined functions" category. If I understand/
remember correctly the function displayed in my custom category is
actually a function from the dll - it is only when it gets inserted
into the workbook that it uses the VBA function. So I think the help
file needs to be set by the dll (ie. defined in Laurent's sheet) not
just in the VBA project.

Anyway, I tried setting the help ID via Application.MacroOptions just
incase that worked. Even when accesesing via the "User defined
functions" category I get an error message, "Error opening MSHelp".
Not sure if that is due to a conflict with the dll help link.

If I enter the Help ID in Laurent's sheet as "c:\...
\ConverUnitsHelp.chm!102" then the help app tries to open but just
shows a blank page. Curiously, if I do not have the quotes around the
entry (which I assume was what was intended) then everything hangs and
eventually I get the message, "Not enought memory...". If I include
the quotes then it does not hang but I still just get a blank help
page.

If I just enter teh ID in Laurent's sheet, ie. 102 then I get a
message: "Help reference not valid" and then "No help available". I
suspect this is probably coming from the .dll itself.

It almost looks like there isomething wrong with my ID and file mapping
but I think I am using the same mapping as you - except with different
file names (I just used the names in the book), ie.

[FILES]
ConvertUnit.htm

[ALIAS]

[MAP]

where TopicToID.h contains:
ConvertUnit=ConvertUnit.htm

and TopicToFile.h contains:

Not sure if I am missing something or you have any other suggestions to
try?

Thanks again,
Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top