Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
截至目前,我只能通过以下代码嵌入文档:
Dim wordDoc as word.document wordDoc.InlineShapes.AddOLEObject Filename:="C:/Doc.doc", Linktofile:=False, DisplayAsIcon:=True, IconLabel:="Sample"
问题是我想将对象嵌入到表格中的特定单元格中。发生的事情是它仅插入第一个单元格。我; v试图搜索但没有运气。我是VBA的新手,所以请帮助我。谢谢。:)
这将是这样的:
ActiveDocument.Tables(1).Columns(2).Cells(2).Range.InlineShapes.AddOLEObject Filename:="C:/Doc.doc", Linktofile:=False, DisplayAsIcon:=True, IconLabel:="Sample"