C# 在C中从MS Word获取工作簿#

C# 在C中从MS Word获取工作簿#,c#,ms-office,vsto,C#,Ms Office,Vsto,在我的应用程序中,我使用以下代码在microsoft word文档中创建excel工作簿: wordApp.Selection.InlineShapes.AddOLEObject("MSGraph.Chart.8", excellApp.ActiveWorkbook.Name, false, false, Type.Missing, Type.Missing, Type.Missing, Type.Missing); 然后我需要从word文档中获取excel工作簿,我如何才能做到这一点 我还尝

在我的应用程序中,我使用以下代码在microsoft word文档中创建excel工作簿:

wordApp.Selection.InlineShapes.AddOLEObject("MSGraph.Chart.8", excellApp.ActiveWorkbook.Name, false, false, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
然后我需要从word文档中获取excel工作簿,我如何才能做到这一点

我还尝试:

Word.InlineShapes shapes = wordApp.Selection.InlineShapes;

但是,shapeCount等于零。

Word.InlineShapes shapes=wordApp.ActiveDocument.InlineShapes

应该有用