如何从Outlook正文中的Excel表中删除列?

时间:2017-11-05 15:46:30

标签: vba outlook outlook-vba

我需要从粘贴到邮件正文中的Excel表中删除一列。

我需要删除Outlook中的列,而不是Excel。

我看了,找不到任何东西。

1 个答案:

答案 0 :(得分:2)

示例代码:

您可以在immediate窗口中运行命令

运行邮件项目以进行编辑

' this highlights the second column in the second table (that tells you if you have the correct one)
application.Inspectors(1).WordEditor.tables(2).Columns(2).select


' this one deletes the third column in the first table
application.Inspectors(1).WordEditor.tables(1).Columns(3).delete


' this one operates on a single cell
application.Inspectors(1).WordEditor.tables(2).cell(2,2).select

通过在观察窗口中检查application并搜索对象树

来找到它