none
CreateObject("MSScriptControl.ScriptControl") fail in MS Word 2013 x64 RRS feed

  • Question

  • Hello!

    I have macro in my project in MS Word 2013

    Private ScriptEngine As Object
    
    Public Sub InitScriptEngine()
        Set ScriptEngine = CreateObject("MSScriptControl.ScriptControl")
        ScriptEngine.Language = "JScript"
        ScriptEngine.AddCode "function getProperty(jsonObj, propertyName) { return jsonObj[propertyName]; } "
        ScriptEngine.AddCode "function getKeys(jsonObj) { var keys = new Array(); for (var i in jsonObj) { keys.push(i); } return keys; } "
    End Sub

    In MS Word 2013 x32 it works Ok, 

    but in MS Word 2013 x64 I get error "ActiveX component can't create object".

    I registered msscript.ocx library in SysWOW and System32 folders, my user have full permissions for this library but it still doesn't work.

    Does anyone know how to solve this problem?

    Taras Kuzyna


    • Edited by Taras Kuzyna Wednesday, September 17, 2014 6:11 AM
    Wednesday, September 17, 2014 6:10 AM

Answers

  • Hi Taras,

    >>In MS Word 2013 x32 it works Ok, 

    but in MS Word 2013 x64 I get error "ActiveX component can't create object".

    I registered msscript.ocx library in SysWOW and System32 folders, my user have full permissions for this library but it still doesn't work.<<

    As far as I know, MSScriptControl is only availbe for 32-bit Application, we can't use it in 64-bit Word application. The WOW64 is the x86 emulator that allows 32-bit Windows-based  applications to run seamlessly on 64-bit     Windows. It works when we run the 32-bit Office on 64-bit OS.

    And you can get more detail about the difference between 32-bit or 64-bit version of Office from link below:
    Choose the 32-bit or 64-bit version of Office

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 18, 2014 7:25 AM
    Moderator
  • Hi Taras,

    >>Is there any other libraries like this which I can use for MS Word 2013 x64 in this situation?<<

    Sorry, I am not able to find any other libraries which can used for 64-bit Office application. As far as I know, third-party ActiveX controls and add-ins are not able to work with 64-bit version of Office.  Many of ActiveX controls need to be ported and rewritten.

    I suggest that you reserach it on the internet to see whether there are suitable ActiveX control you required.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Taras Kuzyna Friday, September 19, 2014 9:22 AM
    Friday, September 19, 2014 8:10 AM
    Moderator

All replies

  • Hi Taras,

    >>In MS Word 2013 x32 it works Ok, 

    but in MS Word 2013 x64 I get error "ActiveX component can't create object".

    I registered msscript.ocx library in SysWOW and System32 folders, my user have full permissions for this library but it still doesn't work.<<

    As far as I know, MSScriptControl is only availbe for 32-bit Application, we can't use it in 64-bit Word application. The WOW64 is the x86 emulator that allows 32-bit Windows-based  applications to run seamlessly on 64-bit     Windows. It works when we run the 32-bit Office on 64-bit OS.

    And you can get more detail about the difference between 32-bit or 64-bit version of Office from link below:
    Choose the 32-bit or 64-bit version of Office

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 18, 2014 7:25 AM
    Moderator
  • Thank you for your answer!

    Is there any other libraries like this which I can use for MS Word 2013 x64 in this situation?

    Friday, September 19, 2014 5:58 AM
  • Hi Taras,

    >>Is there any other libraries like this which I can use for MS Word 2013 x64 in this situation?<<

    Sorry, I am not able to find any other libraries which can used for 64-bit Office application. As far as I know, third-party ActiveX controls and add-ins are not able to work with 64-bit version of Office.  Many of ActiveX controls need to be ported and rewritten.

    I suggest that you reserach it on the internet to see whether there are suitable ActiveX control you required.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Taras Kuzyna Friday, September 19, 2014 9:22 AM
    Friday, September 19, 2014 8:10 AM
    Moderator
  • Thanks.

    You solved my problem,it bother me a few days.

    Now I can work on for my projects.

    Sunday, September 8, 2019 11:57 AM