PC Review


Reply
Thread Tools Rate Thread

Cannot embed VBScript In HTML Email In Outlook 2003

 
 
=?Utf-8?B?c2FueA==?=
Guest
Posts: n/a
 
      29th Oct 2004
Hi,

System Details: Windows XP Professional SP2, Outlook 2003 SP1, IE6 SP2.

I have a Java appliaction that constructs a HTML Email and sends it to a
mail client. In the HTML Email I have embeded some VBSCRIPT which is called
via the ONCLICK event of an <A> tag. In the VBScript I create an XML document
then mail it via the Outlook API.

On Win2K and Outlook 2000 this worked fine but now, when I click the link in
Outlook 2003, nothing happens (no "Cannot Create ActiveX" messages either) !!!

I have tried putting the message into the Internet zone (with low security)
and the same occurred. I replaced my script with a simple message box call
and this never activates either. I've even tried the "One-off-form" registry
hack, again to no avail.

If I load the sent HTML into a browser it works OK so I am sure the syntax
is right.
Here is an example of the link and script...

<a style="cursor:hand;color:green;text-decoration:underline"
onclick="OpenNewMail('test','test')">OK</a>

<SCRIPT LANGUAGE="VBSCRIPT">

Sub OpenNewMail(strAddress, strSubjectLine)

MsgBox "In OpenNewMail"

End Sub

</SCRIPT>

Can anyone suggest how I can get vbscript to work in a HTML email in Outlook
2003 (has anyone got it to work!)? Is there some sort of new META setting
to make the HTML Outlook 2003 friendly perhaps?

Any help would be massively appreciated as this is driving me barmy!

Cheers
sanx

 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      29th Oct 2004
For security reasons, since May 2000 or so (post-Melissa), Outlook has not
run script code in HTML messages. You'll need to consider another approach.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"sanx" <(E-Mail Removed)> wrote in message
news:730DF5EA-0C69-4E41-93A7-(E-Mail Removed)...
> Hi,
>
> System Details: Windows XP Professional SP2, Outlook 2003 SP1, IE6 SP2.
>
> I have a Java appliaction that constructs a HTML Email and sends it to a
> mail client. In the HTML Email I have embeded some VBSCRIPT which is
> called
> via the ONCLICK event of an <A> tag. In the VBScript I create an XML
> document
> then mail it via the Outlook API.
>
> On Win2K and Outlook 2000 this worked fine but now, when I click the link
> in
> Outlook 2003, nothing happens (no "Cannot Create ActiveX" messages either)
> !!!
>
> I have tried putting the message into the Internet zone (with low
> security)
> and the same occurred. I replaced my script with a simple message box call
> and this never activates either. I've even tried the "One-off-form"
> registry
> hack, again to no avail.
>
> If I load the sent HTML into a browser it works OK so I am sure the syntax
> is right.
> Here is an example of the link and script...
>
> <a style="cursor:hand;color:green;text-decoration:underline"
> onclick="OpenNewMail('test','test')">OK</a>
>
> <SCRIPT LANGUAGE="VBSCRIPT">
>
> Sub OpenNewMail(strAddress, strSubjectLine)
>
> MsgBox "In OpenNewMail"
>
> End Sub
>
> </SCRIPT>
>
> Can anyone suggest how I can get vbscript to work in a HTML email in
> Outlook
> 2003 (has anyone got it to work!)? Is there some sort of new META setting
> to make the HTML Outlook 2003 friendly perhaps?
>
> Any help would be massively appreciated as this is driving me barmy!
>
> Cheers
> sanx
>



 
Reply With Quote
 
=?Utf-8?B?c2FueA==?=
Guest
Posts: n/a
 
      29th Oct 2004
Sue,

Thanks for your response.

I was under the impression that you could still run script but that you had
to run in the "Internet Zone". This is how it is described here
http://office.microsoft.com/en-gb/as...018701033.aspx under the
section "HTML and RTF message security". Is this information erroneous?

In my solution I want to present the user with edit fields that they can
change and then send the changed values back to a mail server inbox which is
monitored by a Java program and processed accordingly. If I use a HTTP form
instead or a link to a web page then I have to involve a web server which I
do not want to do (due to end-customer expense/maintenance etc.). Is it
possible to send a form to a mail address? Can anyone suggest another way to
achieve this solution?

Many thanks
sanx

"Sue Mosher [MVP-Outlook]" wrote:

> For security reasons, since May 2000 or so (post-Melissa), Outlook has not
> run script code in HTML messages. You'll need to consider another approach.
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "sanx" <(E-Mail Removed)> wrote in message
> news:730DF5EA-0C69-4E41-93A7-(E-Mail Removed)...
> > Hi,
> >
> > System Details: Windows XP Professional SP2, Outlook 2003 SP1, IE6 SP2.
> >
> > I have a Java appliaction that constructs a HTML Email and sends it to a
> > mail client. In the HTML Email I have embeded some VBSCRIPT which is
> > called
> > via the ONCLICK event of an <A> tag. In the VBScript I create an XML
> > document
> > then mail it via the Outlook API.
> >
> > On Win2K and Outlook 2000 this worked fine but now, when I click the link
> > in
> > Outlook 2003, nothing happens (no "Cannot Create ActiveX" messages either)
> > !!!
> >
> > I have tried putting the message into the Internet zone (with low
> > security)
> > and the same occurred. I replaced my script with a simple message box call
> > and this never activates either. I've even tried the "One-off-form"
> > registry
> > hack, again to no avail.
> >
> > If I load the sent HTML into a browser it works OK so I am sure the syntax
> > is right.
> > Here is an example of the link and script...
> >
> > <a style="cursor:hand;color:green;text-decoration:underline"
> > onclick="OpenNewMail('test','test')">OK</a>
> >
> > <SCRIPT LANGUAGE="VBSCRIPT">
> >
> > Sub OpenNewMail(strAddress, strSubjectLine)
> >
> > MsgBox "In OpenNewMail"
> >
> > End Sub
> >
> > </SCRIPT>
> >
> > Can anyone suggest how I can get vbscript to work in a HTML email in
> > Outlook
> > 2003 (has anyone got it to work!)? Is there some sort of new META setting
> > to make the HTML Outlook 2003 friendly perhaps?
> >
> > Any help would be massively appreciated as this is driving me barmy!
> >
> > Cheers
> > sanx
> >

>
>
>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      29th Oct 2004
This behavior is not something you can control as the message sender. The
***user*** would have to choose to run your HTML message using the View |
View in Internet Zone setting in Outlook. (If that works at all. I haven't
tested in in OL2003 and would, frankly, be quite happy from a security point
of view if it didn't work.)I know a lot of Outlook users aren't real smart
about security, but most won't know about that option and should be
suspicious of any message that asks them to use it.

A web server/web form is a much better and more secure solution. If you're
concerned about expense, imagine the expense of a single malicious message
with rogue HTML code on it unleasing an infection that affects all the
machines in an office.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"sanx" <(E-Mail Removed)> wrote in message
news:2E3908BE-3935-46C9-9F89-(E-Mail Removed)...
> Sue,
>
> Thanks for your response.
>
> I was under the impression that you could still run script but that you
> had
> to run in the "Internet Zone". This is how it is described here
> http://office.microsoft.com/en-gb/as...018701033.aspx under the
> section "HTML and RTF message security". Is this information erroneous?
>
> In my solution I want to present the user with edit fields that they can
> change and then send the changed values back to a mail server inbox which
> is
> monitored by a Java program and processed accordingly. If I use a HTTP
> form
> instead or a link to a web page then I have to involve a web server which
> I
> do not want to do (due to end-customer expense/maintenance etc.). Is it
> possible to send a form to a mail address? Can anyone suggest another way
> to
> achieve this solution?
>
> Many thanks
> sanx
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
>> For security reasons, since May 2000 or so (post-Melissa), Outlook has
>> not
>> run script code in HTML messages. You'll need to consider another
>> approach.
>>
>> "sanx" <(E-Mail Removed)> wrote in message
>> news:730DF5EA-0C69-4E41-93A7-(E-Mail Removed)...
>> > Hi,
>> >
>> > System Details: Windows XP Professional SP2, Outlook 2003 SP1, IE6 SP2.
>> >
>> > I have a Java appliaction that constructs a HTML Email and sends it to
>> > a
>> > mail client. In the HTML Email I have embeded some VBSCRIPT which is
>> > called
>> > via the ONCLICK event of an <A> tag. In the VBScript I create an XML
>> > document
>> > then mail it via the Outlook API.
>> >
>> > On Win2K and Outlook 2000 this worked fine but now, when I click the
>> > link
>> > in
>> > Outlook 2003, nothing happens (no "Cannot Create ActiveX" messages
>> > either)
>> > !!!
>> >
>> > I have tried putting the message into the Internet zone (with low
>> > security)
>> > and the same occurred. I replaced my script with a simple message box
>> > call
>> > and this never activates either. I've even tried the "One-off-form"
>> > registry
>> > hack, again to no avail.
>> >
>> > If I load the sent HTML into a browser it works OK so I am sure the
>> > syntax
>> > is right.
>> > Here is an example of the link and script...
>> >
>> > <a style="cursor:hand;color:green;text-decoration:underline"
>> > onclick="OpenNewMail('test','test')">OK</a>
>> >
>> > <SCRIPT LANGUAGE="VBSCRIPT">
>> >
>> > Sub OpenNewMail(strAddress, strSubjectLine)
>> >
>> > MsgBox "In OpenNewMail"
>> >
>> > End Sub
>> >
>> > </SCRIPT>
>> >
>> > Can anyone suggest how I can get vbscript to work in a HTML email in
>> > Outlook
>> > 2003 (has anyone got it to work!)? Is there some sort of new META
>> > setting
>> > to make the HTML Outlook 2003 friendly perhaps?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2003 - copy from html email to calendar shows html tags Bob Murdoch Microsoft Outlook Discussion 0 12th Mar 2010 02:58 PM
How to embed HTML in an Email? tom Microsoft Outlook 2 4th Dec 2007 11:43 PM
embed swf file in html email from outlook 2003 =?Utf-8?B?dXJibmpja2N0?= Microsoft Outlook Discussion 1 14th Aug 2006 12:21 PM
Outlook 2003 adds HTML when forwarding HTML email CountZero Microsoft Outlook Discussion 0 3rd Jul 2006 11:48 AM
How do you embed HTML into an email =?Utf-8?B?TkhQUkk=?= Microsoft Outlook Discussion 2 30th Dec 2004 03:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:35 AM.