Could Not Load Type Library - Application Handler

Jonathan2708Jonathan2708 Member Posts: 552
Hi,

I am using NAV 2009 Classic (SQL Server) but I am getting compiler errors with a few objects, with a clean Cronus database. The error is 'Could Not Load Type Library' and the variable seems to always point to the 'Navision Application Handler'. The objects affected are :

CU 5053 - TAPI Management
CU 5054 - Word Management
CU 5064 - E-Mail - Logging

I have completely un-installed NAV, removed any lingering DLLs from previous versions and cleaned any NAV registry entries, then re-installed from scratch again but am still getting the compiler errors.

Any ideas?

Jonathan

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    due to usage of automation u r getting this error
    please check automation files
  • havhav Member Posts: 299
    Do you have your automation dll kept in Classic folder of NAV?
    If yes, then check if this dll has any dependent dll's?
    If yes, then keep your automation dll along with dependent dll's in Classic folder.

    I assume that some automation dll is trying to get registered and fails because its dependent dll are not found.

    Hope the above information is helpfull to you.

    Regards,
    Hemant
    Regards,
    Hemant
    MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
  • Jonathan2708Jonathan2708 Member Posts: 552
    Hi thanks for the replies.

    I'm fairly certain the problem is with the Navision Application Handler component NSAppHandler.dll. This gets installed in the following folder :

    C:\Program Files\Common Files\Microsoft Dynamics NAV\Application Handler

    Codeunit 5054 - WordManagement fails compilation on the second line of the 'WordHandler' function. This line refers to the variable wrdHandler. When I look at the declaration for this variable the subtype is 'Unknown Automation Server.WordHandler'. Further investigation shows the class id lookup is :

    {3C2554FE-2B41-4543-B3E8-E64296773DA5} 2.0

    What's interesting is that the actual version of NSAppHandler.dll that it is installed with 2009 is 2.2.

    I have tried registering the DLL in the NAV Classic Client folder but this makes no difference.

    Jonathan
  • RChurchillRChurchill Member Posts: 55
    Hi Jonathon,

    We too are having these problems. :(

    Have you been able to solve this at all?

    Regards

    Robin
  • byllebylle Member Posts: 47
    Hi Jonathan,

    Are you sure that your NSAppHandler.dll is registered correctly? I’m running Vista and had a similar problem until I manually re-registered the dll.

    I re-registered my dll in this way:

    1) Open a command prompt - remember to do it as Administrator or else you dll won't be registered
    2) Change to your directory with the dll - for me it was C:\Program Files\Common Files\Microsoft Dynamics NAV\Application Handler
    3) Register it manually with the help of regsvr32
    - Try first regsvr32 NSAppHandler.dll - if this fails, then try regsvr32 /i NSAppHandler.dll

    After this I was able to compile codeunit 5054.

    If you look into the Variables, you may still see 'Unknown Automation Server.WordHandler' - this is because your dll has a different version, as when the codeunit originally was compiled. I think this is a left over from NAV 5 ;-) If this causes you any problems, then try changing it to 'Navision Attain ApplicationHandler'.WordHandler'.
  • RChurchillRChurchill Member Posts: 55
    Hi,

    We have tried the above registering but no joy.

    The part it can not get through is in codeunit 5054 and the function is WordHandler.

    WordHandler(VAR wrdDoc : Automation "'Microsoft Word 11.0 Object Library'.Document";VAR Attachment : Record

    Attachment;Caption : Text[2
    CREATE(wrdHandler,TRUE,TRUE);
    NewFileName := wrdHandler.WaitForDocument(wrdDoc);


    When you complie you get the error 'Could Not Load Type Library' and the cursor positions itself at the WaitForDocument term as above. If you comment out that line it compiles.

    Does anybody have any ideas?

    Many Thanks

    Robin
  • RChurchillRChurchill Member Posts: 55
    Hip Hip Hip Hooray! :D

    Thanks Ingrid. =D>

    We tried it all over again. :roll:

    We realized that the Network permissions we were using were NOT full Administrator rights.

    We used one that did and it has worked! \:D/

    Thanks again.
  • RChurchillRChurchill Member Posts: 55
    :oops: Unfortunately, it did NOT work. My colleague (who wishes to remain nameless) thought it had but it hadn't. #-o

    Sorry. :oops:

    Still having exactly the same problems. ](*,)

    Surely there must be someone out there who has had the same problem and either have fixed it or is still having problems.

    Please? [-o<
  • byllebylle Member Posts: 47
    Hi Robin,

    If you are sure that the NSAppHandler.dll is correctly installed, it may also be your Office Version.

    The NSAppHandler.dll is not completely compliant with all Office versions - so you might need to install an older one, as the one that did come with NAV 2009 – alternative you could try upgrading your Office ;-)

    I'm using Office 2007 (Microsoft Word 12.0 Object Library) and have no problems with NSAppHandler.dll 2.2.

    Maybe you should try using the NSAppHandler.dll from NAV 5 - it's a version 2.1.

    One more thing - remember to unregister your NSAppHandler.dll before installing the new one – and of course close your NAV Client during the NSAppHandler.dll switch. (Unregister is done by using regsvr32 –u NSAppHandler.dll)
  • RChurchillRChurchill Member Posts: 55
    Hi Ingrid,

    10 out of 10 for all your help. =D>

    We have registered the V5 version and it works. We will make a note to ensure that the correct version of the handler is registerd according to other software versions.

    Once again, many thanks.

    Robin
Sign In or Register to comment.