mfspini
Mechanical
- Feb 29, 2008
- 7
This is my first post.
I have been programing diferent tools using VBA in Excel that work with SE.
Now I am trying to print a specific sheet of a draft document.
I open the draft document, detect the sheets size and orientation but I can't print out only a specific sheet.
The function I am using is:
Sub PrintOut([Printer], [NumCopies], [Orientation], [PaperSize], [Scale], [PrintToFile], [OutputFileName], [PrintRange], [Sheets], [ColorAsBlack], [Collate])
For example whith an open document:
Set objApp = GetObject(, "SolidEdge.Application")
Set objDoc = Nothing
Set objDoc = objApp.Documents.Open(CStr(Trim(celda.Value)))
lPaperSize = objDoc.ActiveSheet.SheetSetup.SheetSizeOption
lPaperOrient = 1
Call objDoc.PrintOut(Orientation:=lPaperOrient, ColorAsBlack:=True, PaperSize:=lPaperSize)
The document have 3 pages or sheets and I want to print only sheet 1 (call sheet "Sheet1") but I can't.
I have tried lots of posibilities but I can't do it.
I need some help.
I have been programing diferent tools using VBA in Excel that work with SE.
Now I am trying to print a specific sheet of a draft document.
I open the draft document, detect the sheets size and orientation but I can't print out only a specific sheet.
The function I am using is:
Sub PrintOut([Printer], [NumCopies], [Orientation], [PaperSize], [Scale], [PrintToFile], [OutputFileName], [PrintRange], [Sheets], [ColorAsBlack], [Collate])
For example whith an open document:
Set objApp = GetObject(, "SolidEdge.Application")
Set objDoc = Nothing
Set objDoc = objApp.Documents.Open(CStr(Trim(celda.Value)))
lPaperSize = objDoc.ActiveSheet.SheetSetup.SheetSizeOption
lPaperOrient = 1
Call objDoc.PrintOut(Orientation:=lPaperOrient, ColorAsBlack:=True, PaperSize:=lPaperSize)
The document have 3 pages or sheets and I want to print only sheet 1 (call sheet "Sheet1") but I can't.
I have tried lots of posibilities but I can't do it.
I need some help.