当前位置: 代码迷 >> AutoCAD >> 怎么编程实现在word中插入AutoCAD图形
  详细解决方案

怎么编程实现在word中插入AutoCAD图形

热度:8612   发布时间:2013-02-26 00:00:00.0
如何编程实现在word中插入AutoCAD图形?
如题,困扰了好几天的问题,望高人指点。

------解决方案--------------------------------------------------------
哦,看错了,是编程实现呀。
http://discussion.autodesk.com/thread.jspa?threadID=604446 
Public Sub Run_This_Sub_From_Acad()

Dim oWord As Word.Application

ThisDrawing.SendCommand "copyclip" & vbCr & "ALL" & vbCrLf

On Error Resume Next
Set oWord = GetObject(, "Word.application")

If Err Then
Set oWord = CreateObject("Word.application")
oWord.Visible = True
oWord.Documents.Add
End If

On Error GoTo 0

oWord.Selection.Paste

End Sub

  相关解决方案