Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Office js office.js是否支持形状集合?_Office Js_Shapes - Fatal编程技术网

Office js office.js是否支持形状集合?

Office js office.js是否支持形状集合?,office-js,shapes,Office Js,Shapes,office.js是否支持“形状”集合?如果是这样的话,我该如何迭代它?下面是我试图在office.js中实现的等效C#代码 foreach (Word.Shape shape in document.Shapes) { if (shape.Type == Microsoft.Office.Core.MsoShapeType.msoTextBox) { string shapeText = shape.TextFrame.TextRange.Text; }

office.js是否支持“形状”集合?如果是这样的话,我该如何迭代它?下面是我试图在office.js中实现的等效C#代码

foreach (Word.Shape shape in document.Shapes)
{
   if (shape.Type == Microsoft.Office.Core.MsoShapeType.msoTextBox)
   {
       string shapeText = shape.TextFrame.TextRange.Text;
   }   
}

根据一些快速的研究,我可以得出结论,所描述的“Shapes”属性在Office.js Word API中不可用。Office.js Word API只允许与文档中非常精选的对象子集进行交互。可以检索并可能与您相关的对象包括:

目前不支持图形、浮动图片、活动X控件、形状和其他。您可以尝试通过解析OOXML来检索这些对象。这似乎支持形状。这可能意味着您需要的功能将及时进入Office.js Word API