jswidorski
Programmer
I am trying to run a VB script from a web page. This is the code I am trying to run, but it does not work. I get a goof error on line 1 character 17. Problem is line 1 is blank...
Outlook is loaded and this script works when I run it as a vbs.
Also, if there are any typos here it is because I shorted then text to readability.
Any thoughts on what I am doing wrong?
==========
<SCRIPT LANGUAGE=VBScript>
Sub generate_vCard()
Const olApptmentItem = 1
Set objOutlook = CreateObject("Outlook.Application")
Set objAppt = objOutlook.CreateItem(olApptmentItem)
objAppt.Start = #10/20/2006 11:00:00 AM#
objAppt.Duration = 60
objAppt.Subject = "Title Here"
objAppt.Body = "This is a Test"
objAppt.Location = ""
objAppt.ReminderMinutesBeforeStart = 15
objAppt.ReminderSet = True
objAppt.Save
End Sub
</SCRIPT>
==========
HTML
==========
<A href="vbscript:generate_vCard();">vCard</A>
Outlook is loaded and this script works when I run it as a vbs.
Also, if there are any typos here it is because I shorted then text to readability.
Any thoughts on what I am doing wrong?
==========
<SCRIPT LANGUAGE=VBScript>
Sub generate_vCard()
Const olApptmentItem = 1
Set objOutlook = CreateObject("Outlook.Application")
Set objAppt = objOutlook.CreateItem(olApptmentItem)
objAppt.Start = #10/20/2006 11:00:00 AM#
objAppt.Duration = 60
objAppt.Subject = "Title Here"
objAppt.Body = "This is a Test"
objAppt.Location = ""
objAppt.ReminderMinutesBeforeStart = 15
objAppt.ReminderSet = True
objAppt.Save
End Sub
</SCRIPT>
==========
HTML
==========
<A href="vbscript:generate_vCard();">vCard</A>