G
Gary Forsyth
I have a simple enough request I think but cannot find a solution. I have a VB6 app that extracts data from SQL and creates Outlook email messages that are sent to staff inside our corporation. The receiver needs to be able to click on various items in the email body and these should somehow pass parameters to a local COM object that is installed on every computer. I have been using HTMLBody content and constructing HTML code with the items listed.
The problem is that whenever I add anything resembling client-side scripting code (to access the local COM object) into the HTMLBody it gets stripped out either when created or when received by the recipient (I'm not sure). We use Windows 2000 Pro, Outlook 2002 and Exchange 2000
An example: when I add <Script language=...> in the <Head> tag, the whole <Script> section disappears but other tags like <Style> remain intact
I can't even add a <A OnClick=...> tag. <A> tags with "OnClick" events don't work either
The only way I can get something to work is to call a hyperlink to an ASP page and pass the necessary parameters through to a webpage. On the webpage the ASP creates the required client-side script and finally I can access the local COM object but this seems like overkill.
And the biggest problem using this method is that I cannot control the automatic closing of the webpage that pops up in Internet Explorer. I can add a window.close command after the COM object has run but it ALWAYS displays a messagebox alerting the user that something is attempting to close the window and should they allow this. Most frustrating! Ideally I don't want a webpage to startup everytime the use clicks something on the email message - I just want the COM object to run with some passed parameters - this is the primary goal
Can anyone suggest a simple piece of code that Outlook WILL allow to exist in the email body that can run my COM object somehow? I've even considered using IFRAMES in the HTMLBody as these can contain other HTML pages, but again I can't figure out how to pass information to the IFRAME from a simple <A> tag (I've tried naming the IFrame and setting the <A> tag target to the iframe name but, no go). If we can reduce some security in Outlook to allow it to contain <SCRIPT> tags and run OnClick events then that's ABSOLUTELY FINE - as we are securely behind several firewall systems and this whole project is run internally only. I've also wondered if I could hide the COM code in a server-based Outlook custom form? I haven't used Outlook forms much yet but it that's the only way, I'll learn!
Many thanks for your time
Gar
The problem is that whenever I add anything resembling client-side scripting code (to access the local COM object) into the HTMLBody it gets stripped out either when created or when received by the recipient (I'm not sure). We use Windows 2000 Pro, Outlook 2002 and Exchange 2000
An example: when I add <Script language=...> in the <Head> tag, the whole <Script> section disappears but other tags like <Style> remain intact
I can't even add a <A OnClick=...> tag. <A> tags with "OnClick" events don't work either
The only way I can get something to work is to call a hyperlink to an ASP page and pass the necessary parameters through to a webpage. On the webpage the ASP creates the required client-side script and finally I can access the local COM object but this seems like overkill.
And the biggest problem using this method is that I cannot control the automatic closing of the webpage that pops up in Internet Explorer. I can add a window.close command after the COM object has run but it ALWAYS displays a messagebox alerting the user that something is attempting to close the window and should they allow this. Most frustrating! Ideally I don't want a webpage to startup everytime the use clicks something on the email message - I just want the COM object to run with some passed parameters - this is the primary goal
Can anyone suggest a simple piece of code that Outlook WILL allow to exist in the email body that can run my COM object somehow? I've even considered using IFRAMES in the HTMLBody as these can contain other HTML pages, but again I can't figure out how to pass information to the IFRAME from a simple <A> tag (I've tried naming the IFrame and setting the <A> tag target to the iframe name but, no go). If we can reduce some security in Outlook to allow it to contain <SCRIPT> tags and run OnClick events then that's ABSOLUTELY FINE - as we are securely behind several firewall systems and this whole project is run internally only. I've also wondered if I could hide the COM code in a server-based Outlook custom form? I haven't used Outlook forms much yet but it that's the only way, I'll learn!
Many thanks for your time
Gar