-1

有没有办法检测 Word 文档中的形状调整大小?

问候

4

1 回答 1

2

Word 对象模型中没有任何事件提供此功能。但是您可以保存形状的大小,然后处理例如DocumentBeforeSave,然后:

foreach (Microsoft.Office.Interop.Word.Shape shape in wordDoc.Shapes)
{ 
   if (shape.Width != oldShapeWidth || shape.Height != oldShapeHeight)
   {
   //...
   }
}
于 2012-12-03T09:58:04.203 回答