Sign in to follow this  
Followers 0
randallc

Array 2D into a table in a Word doc?

2 posts in this topic

Hi,

Has someone a quick demo of inserting Array 2D into a table [ie start a new table] in a Word doc? I know this can be easy in Excel, but there doesn't seem to be an answer in Word.au3?

Specifically, i need to put it at start of a footer, autosize clumns, and 4 cols...! ; but the details later, if I canjust get started...

Thanks, Randall

Share this post


Link to post
Share on other sites



btw, best I can do is;

_Array2DToArStrings ($aItems2D, $aItems)
    $sSysListView = StringReplace(_ArrayToString($aItems, @CRLF), "|", @TAB)
    $oApplication.Visible = False
    $oApplication.Selection.HomeKey ($wdStory)
    $oApplication.Selection.InsertBefore ($sSysListView)
    $oApplication.Run("TemplateProject.EditSelectAll.MAIN")
    With $oApplication.Selection.Font
        .Name = "Arial" 
        .Size = 6
    EndWith
    Local $wdLine = 5, $wdSeparateByTabs = 1, $wdAutoFitBehavior = 1;0;1,2
    $oApplication.Selection.ConvertToTable ($wdSeparateByTabs, Default, Default, Default, Default, Default, Default, Default, Default, Default, Default, Default, Default, $wdAutoFitBehavior, $wdAutoFitBehavior, $wdAutoFitBehavior)
But therer is a beter way?

Best, Randall

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0