Copy link to clipboard
Copied
Hi, I am trying to open a word file from the RoboHelp source files and am getting the following error:
Runtime Error '5152': Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
I am using Word 2003 and RoboHelp 8. I didnt not change anything in the code, its a RoboHelp provided code. RH was installed with my netword id and with admin rights. When I click debug, it highlights the following piece of code.
Private Function IsRoboHookLoaded() As Boolean
IsRoboHookLoaded = False
' No addins, not loaded
If (AddIns.Count = 0) Then
GoTo IsRoboHookLoadedExit
End If
For i = 1 To AddIns.Count
AddInName$ = LCase$(AddIns.Item(i).Name)
If (AddInName$ = "robohook.wll") Then
If (AddIns.Item(i).Installed = True) Then
IsRoboHookLoaded = True
Exit For
End If
End If
Next
IsRoboHookLoadedExit:
End Function
Also, when I click end and try to close the Document, I get another error:
Runtime Error '5152': Method 'Name' of Object 'AddIN' failed.
It again highlights the same piece of code on debug.
Can you please suggest why this might be so?
Thanks in advance.
- Shubs
Copy link to clipboard
Copied
See if this helps.
http://kb2.adobe.com/cps/100/rb_100000.html
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Hi, Thanks for your reply. I already checked that and I dont have PDFMaker.dot template in my addins. Any other thoughts?
Copy link to clipboard
Copied
In Word try Help > About > Disabled add ins.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Hi Peter, what exactly do you want me to check there?
There is nothing in the "Disabled Items" list under Word's Help > About Microsoft Office Word > Disabled Items.
Copy link to clipboard
Copied
Attached is a screen shot of the errors I am getting. I also tried removing PDFMCustom.dot from the templates and Add-ins but to no avail. Any help is appreciated.
Copy link to clipboard
Copied
Attached is a sceen shot of the errors I am getting. I also tried removing PDFMCustom.dot from the templates and addins but to no avail.
Copy link to clipboard
Copied
No screenshot attached but the camera icon is better than attaching. You see the image in the post.
I wanted you to check there were no disabled add ins so that is now ruled out.
The next step has to be to see if this occurs with other projects.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
It doesn't allow me to upload attachments or pic using the camera option.
Anyways, here is something I found:
I get the error when the RoboHELP.dot template is in the same folder as the word docs (source files) which I am trying to open. If I delete the robohelp.dot from that folder, the error no more comes. BUT, the document's formatting disappears (which I dont want). I want to open and edit the document in the Robohelp template format.
Does this ring any bell?
P.S. And yes it does happen with other projects as well if the Robohelp.dot template is in the folder.
-Shubs
Copy link to clipboard
Copied
The template should not be in the project whereas your docs should be.
When you remove the template, the document needs to be reattached to the wherever the template is, which should be where your normal.dot template is. You do that via Templates and Add-Ins.
That said I have seen projects with the template in with the docs and whilst there were some minor issues, there was nothing like this result. However, you have identified it does fix the problem.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Peter, it does not resolve the problem. The problem is if I remove the template from the projects folder, all the formatting (in the robohelp.dot) disappears. The whole document becomes plain text. Even if I attach the RoboHelp.dot template from application data/microsoft/templates, the document remains unformatted. I want to be able to open the document and edit it, retaining its formatting. Is there an email address I can send you screenshots of the document with the template and without ?
Copy link to clipboard
Copied
I don't need to see the difference.
When you change to the other template, it has different styles. Take a backup copy of that template and save the copy somewhere safe.
Try then putting your template with the styles where that one was located.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
I'm not using RH8 for Word, but based on the error message, you are probably missing the robohook.wll file.
This file should be in this location: C:\Documents and Settings\<user name>\Application Data\Microsoft\Word\STARTUP
It is possible when it was installed from the network that this file did not get installed and/or registered. Check to see if the file is there.
It is correct that the robohelp.dot file and all other RH template files should be stored in the ..\application data\templates folder.
When you view the template in the doc (Format, Styles - I think) the robohook.wll should be checked. If not, select add, locate the robohook.wll.
I'm hoping this works...
Copy link to clipboard
Copied
Hi Betty, thanks for your input. But robohelp.wll is present in startup folder and is attached to the template (under tools/template and add-ins). I have already checked most of the things I could find online (in other forums), everything seems to be all right, I am still getting the error. Any other thoughts?
Copy link to clipboard
Copied
So if you have the robohelp.dot in the application data\templates folder and open the project and the doc, the fomatting is gone in the doc and it is is plain text, correct? Are any styles attached to the text at all? For instance if you highlight what was a heading 1, is it still heading 1?
I'm thinking that even if the doc has lost its formatting, you should be able to go to the styles, select the robohelp.dot file and copy those styles into your current doc and then the current doc should display those styles automatically.
Again, zip up your RH source project before trying this.
Also, if you create a new help project, do you run into the same problem?
Copy link to clipboard
Copied
The formatting is lost if the robohelp.dot template is not present in the same folder as the word document I am trying to open (and edit). The template is still present under application data\templates. Below are your answers:
So if you have the robohelp.dot in the application data\templates folder and open the project and the doc, the fomatting is gone in the doc and it is is plain text, correct? - Yes
Are any styles attached to the text at all? - Yes
For instance if you highlight what was a heading 1, is it still heading 1? - Yes - It still shows as heading 1, but not as big and coloured as the headings in documents with robohelp.dot
if you create a new help project, do you run into the same problem? - Yes
I tried copying the styles from robohelp.dot to my document, but still it doesn't reflect the changes.
I want to be able to open the document (with the robohelp template and its styles attached to it) and edit it, without changing any styles/formatting.
I am not an expert on this but my feeling is it has something deeper to do with other than just the location of the template or the styles. There should be a reason for the runtime error 5152: "Can't move focus to control....".
Copy link to clipboard
Copied
Did you go to Tools > Templates and Add-Ins and Attach your document to the template outside the project?

See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Yes I did. Its attached to the robohelp.dot template
Copy link to clipboard
Copied
Does the filename have the path in front of it? If it is just the filename, that suggests it is looking for robohelp.dot in the project and because it is not there, it will not find the styles.
Also try ticking the Automatically Update styles box. If that works, I suggest you return and untick it.
It might also be worth returning to a backup and making a further copy, then do some testing in that.
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
It has the path infront of it. Autmatically update styles box is ticked as well.
Here is what I did and it seems to have resolved the issue.
1) Copied Robohelp.dot template somewhere on my local drive (other than the projects folder).
2) While editting the doc, attached RoboHELP.dot from the C:\Documents and settings\user_id\Application data\Microsoft\Templates
3) Copied styles from Robohelp.dot (on local) to RoboHELP.dot in Microsoft\Templates folder.
This seems weird but it works fine and retains the styles/formats in the original document.
I am not sure if the roboHELP.dot was messed up or something but now its working fine.
Thanks everyone for your help and support.
Best,
Shubs
Copy link to clipboard
Copied
Isn't that what I said? Link to a template outside the project and import the styles into it from the template that had the good styles.
Anyway, glad it is sorted.
See www.grainge.org for RoboHelp and Authoring tips
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more