qandry
asked on
PrintTemplateInstantiation as webbrowser trigger
I am connecting to a website that generates data That I wish to collect.
After having fed in the data and performed the necessary calculations a Print button appears.
I succesfully used sendkeys to select and copy the screen to a file for filtering and saving, which usually works but is not in the least elegant as I have to cancel the print dialog that is autmatically generated and then call on my own procedure.
I've come across an event in webrowser ".PrintTemplateInstantiati on" which is definitely triggered after clicking the print button.
The question: How could I use PrintTemplateInstantiation = True to cancel the generation of the print dialog box.
This question is probably worth a lot more than the 80 points I have to spend. If so please advise of same and I shall have to postpone the question untill I can earn my way.
After having fed in the data and performed the necessary calculations a Print button appears.
I succesfully used sendkeys to select and copy the screen to a file for filtering and saving, which usually works but is not in the least elegant as I have to cancel the print dialog that is autmatically generated and then call on my own procedure.
I've come across an event in webrowser ".PrintTemplateInstantiati
The question: How could I use PrintTemplateInstantiation
This question is probably worth a lot more than the 80 points I have to spend. If so please advise of same and I shall have to postpone the question untill I can earn my way.
Could you post the url?
Regarding second, just ask to community support to delete it or put a comment with a link to this one.
Regarding second, just ask to community support to delete it or put a comment with a link to this one.
ASKER
Richie the url is www.foodstandards.gov.au/npc/anzfa_npc/
You would need to
1/ search for an ingredient ie 'honey'
2/ select one of the results
3/ nominate a recipe name
4/ click add ingredient
5/ then nominate final weight and serve size.
6/ click calculate
7/ finally PRINT. " it is this that I wish to capture and cancel.
You would need to
1/ search for an ingredient ie 'honey'
2/ select one of the results
3/ nominate a recipe name
4/ click add ingredient
5/ then nominate final weight and serve size.
6/ click calculate
7/ finally PRINT. " it is this that I wish to capture and cancel.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Richie,
I thouht you would have the answer. I had already seen your code for capturing controls on a web page and thought it could work.
What I don.t understand is how
-
Private Function btn_onclick() As Boolean
MsgBox "got it!"
End Function
-
does this manage to interupt the predefined function of the button?
I had hoped to stop at the document produced upon the pressing of the print button but avoid the automated print dialog box appearing, but I can get all the data i need at this current point. Thank you
I thouht you would have the answer. I had already seen your code for capturing controls on a web page and thought it could work.
What I don.t understand is how
-
Private Function btn_onclick() As Boolean
MsgBox "got it!"
End Function
-
does this manage to interupt the predefined function of the button?
I had hoped to stop at the document produced upon the pressing of the print button but avoid the automated print dialog box appearing, but I can get all the data i need at this current point. Thank you
"...does this manage to interupt the predefined function of the button?..."
Yes, you are switch the "real" event with yours.
It is similar of how to avoid right click on a web page and use your own menu instead of default one.
You could see it at http://www.angelfire.com/realm/vb-shared/IE_WB_DOM_tips.htm
Thanks for "A" grade.
Yes, you are switch the "real" event with yours.
It is similar of how to avoid right click on a web page and use your own menu instead of default one.
You could see it at http://www.angelfire.com/realm/vb-shared/IE_WB_DOM_tips.htm
Thanks for "A" grade.
ASKER
How can I delete this question from the programming heading ?
My deepest apologies for starting with so much confusion.