|
发表于 2007-8-28 09:02:00
|
显示全部楼层
http://discussion.autodesk.com/thread.jspa?threadID=604446 Reply is:
Re: Copyclip AutoCad Entity Into Word?
I hope the sample below does what you are asking.
Gary
Public Sub Run_This_Sub_From_Acad()
Dim oWord As Word.Application
'Before execution, set reference to MS Word Object Library
'The statement you mentioned
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
测试了一下,问题得到解决.谢谢 Gary McMaster 的解答.
|
|