bweir
2005-07-18, 07:59 PM
How can I use the CREATEOBJECT function to access the Inventor.ApprenticeServerComponent. Here is my sample code (see below). I'd like to replace...
Dim oApp As New Inventor.ApprenticeServerCompoent
with a Set oApp = CreateObject("?????") but I don't know the string to use. Can somebody help me?
<---Code Begin--->
Sub GetDescrtiptions()
Dim sValue As String
Dim sPath As String
Dim sFile As String
Dim oDoc As ApprenticeServerDocument
Dim oApp As New Inventor.ApprenticeServerComponent
Dim oRange As Range
sPath = "c:\parts\"
Set oRange = Application.Selection
For i = 2 To oRange.Count
sValue = oRange.Item(i)
sFile = sPath & sValue
Set oDoc = oApp.Open(sFile)
oRange.Item(i).Offset(0, 1).Value = oDoc.PropertySets.Item(3).Item(14).Value
Next
End Sub
<---Code End--->
PS I'm using this in Excel.
Dim oApp As New Inventor.ApprenticeServerCompoent
with a Set oApp = CreateObject("?????") but I don't know the string to use. Can somebody help me?
<---Code Begin--->
Sub GetDescrtiptions()
Dim sValue As String
Dim sPath As String
Dim sFile As String
Dim oDoc As ApprenticeServerDocument
Dim oApp As New Inventor.ApprenticeServerComponent
Dim oRange As Range
sPath = "c:\parts\"
Set oRange = Application.Selection
For i = 2 To oRange.Count
sValue = oRange.Item(i)
sFile = sPath & sValue
Set oDoc = oApp.Open(sFile)
oRange.Item(i).Offset(0, 1).Value = oDoc.PropertySets.Item(3).Item(14).Value
Next
End Sub
<---Code End--->
PS I'm using this in Excel.