![]() |
Embedding Help
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 he 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.) |
Embedding Help
On May 27, 6:47*am, atpgroups wrote:
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 hehttp://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 |
Embedding Help
On 27 May, 14:13, JW wrote:
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. |
Embedding Help
On Tue, 27 May 2008 07:37:37 -0700 (PDT), atpgroups
wrote: On 27 May, 14:13, JW wrote: 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. You could decompile your chm into html files and display them via a webbrowser control on a userform. See here http://www.dailydoseofexcel.com/arch...ng-help-files/ -- Dick Kusleika Microsoft MVP-Excel http://www.dailydoseofexcel.com |
All times are GMT +1. The time now is 12:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com