Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I have a dwg # in a sheet cell, how can I print that dwg. from excel vba.
This is as far as I got: (I need help with the last 3 lines) Sub print_dwg_from_excel() A = ActiveWindow.ActiveCell.Value B = Dir("c:\AUTOCAD\" & A") C = "c:\AUTOCAD\" & B Set fs = CreateObject("SCRIPTING.FILESYSTEMOBJECT") Set f = fs.GetFile(C) s = f.PrintOut End Sub thanks in advance Al |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
alram wrote on 5/13/2010 :
If I have a dwg # in a sheet cell, how can I print that dwg. from excel vba. This is as far as I got: (I need help with the last 3 lines) Sub print_dwg_from_excel() A = ActiveWindow.ActiveCell.Value B = Dir("c:\AUTOCAD\" & A") C = "c:\AUTOCAD\" & B Set fs = CreateObject("SCRIPTING.FILESYSTEMOBJECT") Set f = fs.GetFile(C) s = f.PrintOut End Sub thanks in advance Al I'm curious as to why you think that FSO will open a .dwg file, OR why you think you can insert a .dwg into Excel. These are native to AutoCad, which has printing capability built in. They are not image files and so at best all you'll get is the binary data, if you get anything at all. It sounds to me like you have obtained some .dwg files from somewhere but you don't have access to AutoCad. In this case, try using DWG Editor. It's free, and lets you do lots of stuff with the dwg! Just google to find where it can be downloaded. GS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autocad & excel | Excel Programming | |||
AutoCad/Excel | Excel Discussion (Misc queries) | |||
HOW DO I GET CELL LINES TO NOT PRINT IN AUTOCAD DWG? | Charts and Charting in Excel | |||
autocad in excel | Excel Discussion (Misc queries) | |||
edit an autocad r14 | Excel Discussion (Misc queries) |