Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding a .chm help file to Word

    <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    I downloaded the .chm (compiled HTML help file) on Mail Merging from Microsoft and thought it would be a neat thing to add a menu line in the Window|Help menu to open that file. Unfortunately, a lot of search in the MS KB and in the VB Project Explorer didn't show me what I need.

    I thought a shell command would do the job but I get an 'invalid procedure call or arguement' error. getting stumped now. here's the shell code (very simple!):

    Dim RetVal
    RetVal = Shell("C:Program FilesMicrosoft OfficeOffice1033Word2000.chm", 1)

    This sort of thing should be fairly common for developers, so maybe I am just missing something obvious, but i'm getting tuckered out now.

    I thank you in advance for your help...

    Word 2000 SR-1, Office 2000, Windows 2000 5.0.2195

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,853
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Adding a .chm help file to Word

    Steve

    You don't need to do any coding. Just use a plain old hyperlink.

    Tools | Customize => Select the Web Category. Drag the 'Open' into the menu where you want it and then right click it and change its name and chose the hyperlink option down the bottom to link in the chm file.

    I haven't figured out how to avoid the nag message that the user will get when clicking the button so let me know if you work it out.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding a .chm help file to Word

    Thanks! Worked like a charm. I duplicated the action in a macro after using 'hyperlink' to search thru the Project Explorer and no problems there. On the nag screen, I tried a couple of things: 1) setting internet securities all the way down and 2) using Sendkeys in the macro to close the dialog box. Neither thing worked.

    Ah well. At least I can get the help file to open, so thanks!

  4. #4
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding a .chm help file to Word

    Just wondering as to whether anybody found a way of displaying the helpfile (.chm) without the annoying nag dialog (that asks Would you like to open this file ...)?

    OR

    Perhaps any other way of opening and running a .chm file?

    Thanks.
    Thanks.
    Robie

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Adding a .chm help file to Word

    What version of Windows? Try turning off the "Confirm open after download" setting (shown as it appears in Windows 2000). Of course, making this registry change on user's PCs could be a bit more sensitive...
    Attached Images Attached Images

  6. #6
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding a .chm help file to Word

    Maybe the Shell command expects to open an executable program, rather than a file with a "hot" association.
    So perhaps a commandline expression (something) like this would work:

    RetVal = Shell(hh.exe "C:Program FilesMicrosoft OfficeOffice1033Word2000.chm", 1)

    I'm not sure of the syntax here - and I always manage to wrong guess where those &*^%$#@ quotes go.

    Alan

    Edited:
    In fact, this commandline works:
    hh.exe "C:Program FilesMicrosoft OfficeOffice1033Wdweb9.chm", 1

    so hopefully it will from Shell also.

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding a .chm help file to Word

    boy this is an old thread! i can't even find the project i was working on that spawned the original inquiry and the whole issue is basically moribund for me. if memory serves, I didn't like the nag screens and decided the added help file wasn't going to be as helpful as i thought so just dropped the whole thing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •