【问题标题】:Table padding using the MS Word COM object in PHP在 PHP 中使用 MS Word COM 对象填充表格
【发布时间】:2016-11-22 20:46:30
【问题描述】:

我这里有一些代码将使用 PHP 在 Word 文档中创建一个基本表格,它会创建表格并很好地填充它,但我确实需要将表格分流,以便地址(第一个框桌子)可以装进一个有窗的信封里!

    $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

任何建议都会很棒 - 似乎很难在网上找到任何合适的文档。

【问题讨论】:

    标签: php ms-word com


    【解决方案1】:

    属性有RightPadding、TopPadding等。

    您可以在MSDN 找到参考 (选择使用的版本,链接指向Word2003)

    【讨论】:

    • 非常感谢!现在只需要尝试弄清楚如何将其转换为 PHP 代码,但希望不会太难:o
    猜你喜欢
    • 2014-12-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多