Jump to content

Search the Community

Showing results for tags 'udf _word_doctablewrite'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. within the AutoIt Help (v.3.3.14.2), there is an example script showing how to use UDF _Word_DocTableWrite, (shown here): >>>>> #include <MsgBoxConstants.au3> #include <Word.au3> ; Create application object Local $oWord = _Word_Create() If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Word UDF: _Word_DocTableWrite Example", _ "Error creating a new Word application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended) ; Open the test document Local $oDoc = _Word_DocOpen($oWord, @ScriptDir & "\Extras\Test.doc", Default, Default, True) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Word UDF: _Word_DocTableWrite Example", _ "Error opening '.\Extras\Test.doc'." & @CRLF & "@error = " & @error & ", @extended = " & @extended) ; ***************************************************************************** ; Write the content of a 0-based two dimensional array to a Word table ; ***************************************************************************** Local $asArray[3][3] = [[1, 2, 3], ["a", "b", "c"], ["x", "y", "z"]] Local $oRange = _Word_DocRangeSet($oDoc, -2) _Word_DocTableWrite($oRange, $asArray, 0) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Word UDF: _Word_DocTableWrite Example", _ "Error creating the table." & @CRLF & "@error = " & @error & ", @extended = " & @extended) MsgBox($MB_SYSTEMMODAL, "Word UDF: _Word_DocTableWrite Example", _ "Table successfully added to the end of the document.") <<<<< When running this on my machine (Windows 7 Pro and Word 2016), the script returns the following error box: Error creating the table. @error = 3, @extended = -2147352567 Apparently, within the UDF, an attempt to set the .Text value for the object range is passing back this strange error code. $oRange.Text = $sData I seem to recall similar Office Automation COM error in the past, but don't recall what caused it or the solution. Anyone have any idea or suggestions on getting past this error?
×
×
  • Create New...