2018 Apr 07 12:50 PM
Dear All,
We are trying to build a control on printing of document, by setting the indicator for the record as printed once user prints the record.
But, is there any way to find out if user has only done print preview or actually printed the document?
In SAP Smart Forms, there is a flag OUTPUTDONE in parameter JOB_OUTPUT_INFO, which indicate whether document is printed or not. But we print document by using EXCEL file, OLE.
As description in MSDN ( https://msdn.microsoft.com/en-us/vba/excel-vba/articles/workbook-object-excel) , it seems there is not "printed" property in the wookbook object. So, how to know whether document is only printed or only viewed as print preview in EXCEL?
2018 Apr 07 7:12 PM
I think this is either not possible, or else it won't be reliable. What if someone does a "Save as" and prints it later? Or does an Excel to PDF output?
2018 Apr 07 7:12 PM
I think this is either not possible, or else it won't be reliable. What if someone does a "Save as" and prints it later? Or does an Excel to PDF output?
2018 Apr 16 10:08 AM
By calling method "PrintPreview", "Close" and "Quit", program can prevent the files from being saved . Because users can't save or edit file in PrintPreview mode. If user does an Excel to PDF output, it will be considered as "printed"(By smartforms,they can do the same things ).
2018 Apr 16 6:41 PM
2018 Apr 18 2:09 PM
If you create a new Excel file, fill some words in it, then COPY and PASTE the file, you will find nothing in the newest file. Because the document is not SAVED.
2018 Apr 18 2:52 PM
You're missing the point.
If you show an Excel from SAP the user can "Save as" a local file. Or they can copy/paste into new spreadsheet and save, print, email - SAP has no control or knowledge of what happens.
2018 Apr 18 5:39 PM
I agree with Mike, as soon as you open Excel and let user do anything, you no longer control the process. Whatever you do here will be unreliable. I actually doubt this is worth investment. If using standard SAP output functionality, there is an option in configuration to propose output only once. So the output won't be proposed automatically anymore yet this will still allow an authorized person to reprint a copy, if needed.
Personally, I feel some companies tend to exaggerate both the risk of printing another copy of a document and their ability to prevent this (imaginary) risk.
2018 Apr 19 4:20 AM
Oh, I see. I thought program could control the processing by OLE before. But now I see if SAP GUI processing is killed, user will be free to handle the EXCEL file. It is indeed unreliable. Thank you.
2018 Apr 19 4:29 AM
2018 Apr 18 5:24 PM
Zhe,
I am not an expert in Excel. From the link you shared you could maybe use BuiltinDocumentProperties to retrieve the property called "Last Printed". Not sure if this will help and not sure how you can pass this back to SAP.
As an alternative, on return from Print Preview, you could ask the user if the document was printed or not (in a popup). Not the best solution but an option.
Che
2018 Apr 19 4:34 AM
Hi Che,
The "Last Printed" property will be updated when program calls method "PrintPreview", and this calling is nessesary....
By the disscusion with Mike, I have realized that it is unreliabe to control the process by OLE.
Thanks.