07-01-2011, 02:32 PM
Hi.
Do you still need this?
The integration of OneNote with VBScript is not good so we can't directly see the OneNote print from QTP. But, there is another way that I have come across, which will actually export the last print received by OneNote from your application to pdf and show you the pdf. This way you can verify what your application printed in an automated way since QTP can talk to PDF.
Basically, how this will work is based on the following points:
1. When your application gives a print command to OneNote Printer, OneNote saves the data as an image under the "Unfiled Notes.one" file as a new page. This file is usually located at C:\Users\your_user_name\Documents\OneNote Notebooks
2. There is one utility called "OneNote2PDF", which can convert a OneNote file to pdf.
I have tested this on my machine and it works fine. First, I give a print command to OneNote, then run the utility and see how the print looks like.
If you think this suits your situation, I can attempt to package what I did in one small utility so you could just run it without going into details.
This can also be packaged as a QTP add-in to aid everyone in the same boat. Let me know if it's worth the effort.
Do you still need this?
The integration of OneNote with VBScript is not good so we can't directly see the OneNote print from QTP. But, there is another way that I have come across, which will actually export the last print received by OneNote from your application to pdf and show you the pdf. This way you can verify what your application printed in an automated way since QTP can talk to PDF.
Basically, how this will work is based on the following points:
1. When your application gives a print command to OneNote Printer, OneNote saves the data as an image under the "Unfiled Notes.one" file as a new page. This file is usually located at C:\Users\your_user_name\Documents\OneNote Notebooks
2. There is one utility called "OneNote2PDF", which can convert a OneNote file to pdf.
I have tested this on my machine and it works fine. First, I give a print command to OneNote, then run the utility and see how the print looks like.
If you think this suits your situation, I can attempt to package what I did in one small utility so you could just run it without going into details.
This can also be packaged as a QTP add-in to aid everyone in the same boat. Let me know if it's worth the effort.