开发者

Table padding using the MS Word COM object in PHP

开发者 https://www.devze.com 2023-01-18 16:22 出处:网络
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 shunt the table across so that the address (

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 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->Mo开发者_StackOverflow社区veRight (); //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.


The properties are RightPadding, TopPadding and so on.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号