M
mikey2322
Guest
Hi,
I am creating a database to file AutoCAD drawings and I have the code below that identifies the file name in the text box and then opens the file using MS word. However, rather than opening the file using MS Word I would like it to open the AutoCAD drawing using the AutoCAD executable located at C:\Program Files\AutoCAD LT 2005\aclt.exe. Any help would be greatly appreciated.
Private Sub cmdOpenWordDoc_Click()
'Check to see that there is a document file path associated with the record
If IsNull(Me.FilePath) Or Me.FilePath = "" Then
MsgBox "Please Ensure There Is A File Path Associated For This Document", vbInformation, "Action Cancelled"
Exit Sub
Else
'Check that the document specified in the file path is actually there
If (Dir(Me.FilePath) = "") Then
MsgBox "Document Does Not Exist In The Specified Location", vbExclamation, "Action Cancelled"
Exit Sub
Else
'Opens document in Word
Call OpenWordDoc(Me.FilePath)
End If
End If
End Sub
Mike
I am creating a database to file AutoCAD drawings and I have the code below that identifies the file name in the text box and then opens the file using MS word. However, rather than opening the file using MS Word I would like it to open the AutoCAD drawing using the AutoCAD executable located at C:\Program Files\AutoCAD LT 2005\aclt.exe. Any help would be greatly appreciated.
Private Sub cmdOpenWordDoc_Click()
'Check to see that there is a document file path associated with the record
If IsNull(Me.FilePath) Or Me.FilePath = "" Then
MsgBox "Please Ensure There Is A File Path Associated For This Document", vbInformation, "Action Cancelled"
Exit Sub
Else
'Check that the document specified in the file path is actually there
If (Dir(Me.FilePath) = "") Then
MsgBox "Document Does Not Exist In The Specified Location", vbExclamation, "Action Cancelled"
Exit Sub
Else
'Opens document in Word
Call OpenWordDoc(Me.FilePath)
End If
End If
End Sub
Mike