none
Having trouble with Applescript RRS feed

  • Question

  • Hello there,

    Someone directed me here from: https://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-msoffice_custom/issues-with-applescript/c3ac6e54-2222-4e33-8d35-a8cfc50e7f42?msgId=a1294745-0f2b-4b9d-84f1-17f4ae32fd01


    I'm having issues with Applescript working properly for a number of commands...


    Here are some examples:


    tell application "Microsoft Word"

    execute find find text "hello"

    end tell


    The resulting response is: 

    error "Microsoft Word got an error: Can’t continue execute find." number -1708


    Another example:


    tell application "Microsoft Word" to page scroll down 1



    And the result:


    error "Microsoft Word got an error: Can’t continue page scroll." number -1708

    Does anyone have an idea what is going on? Is my applescript incorrect or am I missing something else?


    I have also tried making a script and placing it in ~/Library/Application\ Scripts/com.microsoft.Word and tried calling it from a macro using AppleScriptTask:

    Sub hello()

        Dim myScriptResult As String

        myScriptResult = AppleScriptTask("pagescroll.scpt", "myapplescripthandler", "my parameter string")

    End Sub

    on myapplescripthandler(paramString)

    #do something with paramString 

    tell application "Microsoft Word" to page scroll down 1

    display notification paramString

    return "You told me " & paramString

    end myapplescripthandler


    And I get the following issue: https://fud.community.services.support.microsoft.com/Fud/FileDownloadHandler.ashx?fid=0264c181-e56e-4d34-9ae5-2b34571662c8

    Any guidance would be greatly appreciated.

    Thank you,

    Harold

    Friday, January 6, 2017 4:20 AM

All replies

  • Hi,

    I do apologize that this forum is for Windows OS. We could not offer support for issues about AppleScript. I suggest you ask in Apple forum which should support AppleScript.

    Sorry for any inconvenience and have a nice day! 

    Regards,

    Celeste

     


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 9, 2017 2:35 AM
    Moderator