tags:

views:

16

answers:

1

Hi guys,

I've got some code here that will create a basic table in a Word document using PHP, it creates the table and populates it just fine, but I really need to kinda shunt the table across so that the address (first box of the table) fits into a windowed envelope!

    $word->ActiveDocument->Tables->Add ( $word->Selection->Range, 1, 3 ); //creates table with 3 columns

    $word->Selection->TypeText ( $pretext [0] );
    $word->Selection->MoveRight (); //move to next column
    $word->Selection->TypeText ( $pretext [1] );
    $word->Selection->MoveRight (); //move to next column
    $word->Selection->TypeText ( $pretext [2] );
    $word->Selection->MoveRight (); //move off the table

Any suggestions would be fantastic - it seems really difficult to find any decent documentation for this online, thank you!

+1  A: 

The properties are RightPadding, TopPadding and so on.

You find the Reference at MSDN (choose the used version, the link points to Word2003 )

Dr.Molle
Thank you so much! Just need to try and work out how to convert that into the PHP code now, but hopefully won't be *too* hard :o
Nick