//------------------------------------------------------------------//
Function ConvertToExcelPrinterFriendlyName(cPrinterName, cConector)
local oReg:=TReg32():New( HKEY_CURRENT_USER, "Software\Microsoft\Windows NT\CurrentVersion\Devices")
cPrinterName:= cPrinterName + " "+ALLTRIM(cConector)+" " + Token(oReg:Get( cPrinterName ),",",2)
oReg:Close()
return cPrinterName
oExcel := NewObjectOle( "Excel" )
oExcel:WorkBooks:Open("C:\Tmp\Planilla.xls")
oExcel:Sheets:Item( 1 ):Select()
oExcel:ActivePrinter:=ConvertToExcelPrinterFriendlyName("PDFCreator", Token(oExcel:ActivePrinter," ",2))
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 122 guests