View Single Post
 
Old 09-08-2015, 08:15 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Freedom20 View Post
Dim SS 'As AcadSelectionSet Word will not let me declare this as a selection set
You could only do that if you were using early binding, but you're using late binding.

Quote:
Originally Posted by Freedom20 View Post
Set SS = AcadApp.ActiveDocument.SelectionSets.Add("SS")
Set SS = Nothing
'SS.AcadApp.SelectAll
AcadApp.ActiveDocument.Export "C:\drawing", "WMF", SS
'at this point AutoCAD waits for me to select items on drawing.
'according to AutoCAD's help if the selection set is Nothing it is supposed to select the entire drawing.
Given that you've already 'Set SS = Nothing', there's nothing to export. You really should leave that line until after you've finished with the object.

Quote:
Originally Posted by Freedom20 View Post
' AcadApp.ActiveDocument.sendcommand "Exit" & vbCr
' is there a way to close AutoCAD without using SendCommand?
That all depends on what methods are available in AutoCAD (e.g. AcadApp.Quit might be a valid method) - it's not really a Word issue. Ordinarily, though, one would also expect the open file to be closed before you quit the application.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote