Printing an Autocad drawing from Access using viewer

I would like to print a copy of a drawing for a job with the job sheet. I do this with PDF's by storing the address of the file.

Is there a way to do this with Autocad and ideally solidworks viewers.

i.e. if the viewers are installed on the PC is there any way I store a reference to a drawing file  and automatically print the drawing to save them creating PDFs for each drawing.
Who is Participating?
Jeffrey CoachmanMIS LiasonCommented:
A bit confused about exactly what you have here and what you want...

In any event,  you can print just about any exiting file from VBA using code like this in a module:

Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal Hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

Then, if you have the full path to the file in a field on a form (here my name for this field is called "FileData"), you can use code like this to print the file from the form:

Dim result As Long
result = ShellExecute(0&, "print", Me.FileData, vbNullString, vbNullString, vbHidden)

Code from here:

donhannamAuthor Commented:
Thanks Jeff,

I am waiting for more info from client but think what you are saying will work - need to close so I can ask another question
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.