Embedding Help

A

atpgroups

I have written a Macro which approaches an application in its
complexity. (In retrospect it might have been better as a standalone
application but there are advantages related to portability and
familiarity which mean that Excel is a natural home for it). We have
written a 50 page manual for the Macro.

I would like to embed the help files in the workbook somehow so that
the macro/application can be distributed as a single Excel workbook.

I have tried embedding the help file (in . chm format) in a hidden
worksheet as an OLEobject, and displaying it with
wsHelp.OLEObjects(fHelp).Show
and this is partially successful, but unfortunately this triggers a
rash of security warnings, and, more problematically, none of the
links in the embedded help file work.
Is there any way to embed a .chm file in such a way that it remains
functional? or can anyone think of another way to keep the help and
workbook together in one file? (I can display a seperate help file
trivially with
Shell "hh.exe " & ThisWorkBook.Path & "\helpfile.chm"
but I don't really want to trust the users to put the help file in the
right place.
I have put a very simple example file here:
http://www.bodgesoc.org/HelpDemo.xls
This is a single worksheet with a button linked to an embedded version
of the HyperTerminal help file, it demonstrates the broken links
problem quite well.
(As always, use appropriate caution opening linked files from the
internet, but I promise that the linked file is harmless as posted.
Not that a black hat might not hack my website and change it of,
course.)
 
J

JW

I have written a Macro which approaches an application in its
complexity. (In retrospect it might have been better as a standalone
application but there are advantages related to portability and
familiarity which mean that Excel is a natural home for it). We have
written a 50 page manual for the Macro.

I would like to embed the help files in the workbook somehow so that
the macro/application can be distributed as a single Excel workbook.

I have tried embedding the help file (in . chm format) in a hidden
worksheet as an OLEobject, and displaying it with
 wsHelp.OLEObjects(fHelp).Show
 and this is partially successful, but unfortunately this triggers a
rash of security warnings, and, more problematically, none of the
links in the embedded help file work.
Is there any way to embed a .chm file in such a way that it remains
functional? or can anyone think of another way to keep the help and
workbook together in one file? (I can display a seperate help file
trivially with
Shell "hh.exe " & ThisWorkBook.Path & "\helpfile.chm"
but I don't really want to trust the users to put the help file in the
right place.
I have put a very simple example file here:http://www.bodgesoc.org/HelpDemo.xls
This is a single worksheet with a button linked to an embedded version
of the HyperTerminal help file, it demonstrates the broken links
problem quite well.
(As always, use appropriate caution opening linked files from the
internet, but I promise that the linked file is harmless as posted.
Not that a black hat might not hack my website and change it of,
course.)

Why not keep the files seperate and use an installer to place the
files where they are supposed to be? I distribute many Excel Add-Ins
and use InnoSetup, which is free, to handle the installation.
Typically, my add-ins have 3 files: the main add-in file, a .chm help
file, and a .xls file with an Open event to handle the installation of
the add-in.

In the InnoSetup script, I tell the program to launch the
installation .xls file when complete. Then the code in the Open event
of that file installs the add-in. This is the code I use to install
the add-in.

Private Sub Workbook_Open()
Dim wBook As Workbook
On Error Resume Next
Set wBook = Workbooks("your_addin.xla")
start:
'close book if open
If Not wBook Is Nothing Then wBook.Close 'Not open
'uninstall if installed
If AddIns("your_addin").Installed = True Then _
AddIns("your_addin").Installed = False
'install add-in
Set myAddIn = AddIns.Add(FileName:="C:\your_addin\your_addin.XLA",
_
CopyFile:=True)
AddIns("your_addin").Installed = True
Workbooks("your_addin_Installer.xls").Close
End Sub

Link to InnoSetup:
http://www.jrsoftware.org/isinfo.php

HTH
 
A

atpgroups

Why not keep the files seperate and use an installer to place the
files where they are supposed to be?  

It's certainly an option, but one I was hoping to avoid. If I embed
the help file then people can pass the sheet+macro around freely, and
they still get the help file. If I use an installer then they have to
pass the installer round (and it is likely to get stripped by the
email system).
Folk wouldn't expect to pass an application around and have it still
work, but they are used to Excel workbooks being portable.
 
D

Dick Kusleika

It's certainly an option, but one I was hoping to avoid. If I embed
the help file then people can pass the sheet+macro around freely, and
they still get the help file. If I use an installer then they have to
pass the installer round (and it is likely to get stripped by the
email system).
Folk wouldn't expect to pass an application around and have it still
work, but they are used to Excel workbooks being portable.

You could decompile your chm into html files and display them via a
webbrowser control on a userform. See here

http://www.dailydoseofexcel.com/archives/2004/10/21/creating-help-files/
 

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