Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-03-2006, 08:02 PM   PM User | #1
maxpouliot
New Coder

 
Join Date: Mar 2006
Posts: 90
Thanks: 2
Thanked 0 Times in 0 Posts
maxpouliot is an unknown quantity at this point
add outlook Appointment

hello

the following code works :

<SCRIPT LANGUAGE="VBScript">
sub ajouterOutlook()
On error resume next
Const olAppointmentItem = 1
Set objOutlook = CreateObject("Outlook.Application")
Set objAppointment = objOutlook.CreateItem(olAppointmentItem)
If err.number = 0 Then
objAppointment.Start = #12/25/2005 17:00 PM#
'Utilisez soit objAppointment.Duration OU objAppointment.End, mais pas les deux
objAppointment.Duration = 5
'objAppointment.End = #12/25/2005 18:00 PM#
objAppointment.Subject = "test"
objAppointment.Body = "test"
objAppointment.Location = "#Salle"
objAppointment.ReminderMinutesBeforeStart = 10
objAppointment.ReminderSet = True
objAppointment.display
else
msg = "Veuillez démarrer Outlook avant d'appuyer sur le bouton."
MsgBox msg
end if
end sub
</script>

But, i would like to add arguments to the sub

example,

sub ajouterOutlook(startDate)
objAppointment.Start = #" & startDate & "17:00 PM#

Anyone knows how come this doesnt work?
maxpouliot is offline   Reply With Quote
Old 04-03-2006, 08:11 PM   PM User | #2
Brandoe85
teh Moderatorinator


 
Join Date: Sep 2004
Location: USA
Posts: 2,472
Thanks: 4
Thanked 40 Times in 40 Posts
Brandoe85 will become famous soon enough
What error are you getting?
__________________
-Brando
Why using tables for eating is stupid!
Brandoe85 is offline   Reply With Quote
Old 04-03-2006, 08:14 PM   PM User | #3
maxpouliot
New Coder

 
Join Date: Mar 2006
Posts: 90
Thanks: 2
Thanked 0 Times in 0 Posts
maxpouliot is an unknown quantity at this point
Quote:
Originally Posted by Brandoe85
What error are you getting?
outlook object doesnt appear anymore
maxpouliot is offline   Reply With Quote
Old 04-03-2006, 08:33 PM   PM User | #4
Brandoe85
teh Moderatorinator


 
Join Date: Sep 2004
Location: USA
Posts: 2,472
Thanks: 4
Thanked 40 Times in 40 Posts
Brandoe85 will become famous soon enough
Try just adding the date variable:
PHP Code:
<html>
<
head>
<
SCRIPT LANGUAGE="VBScript">
sub ajouterOutlook(startDate)
On error resume next
Const olAppointmentItem 1
Set objOutlook 
CreateObject("Outlook.Application")
Set objAppointment objOutlook.CreateItem(olAppointmentItem)
If 
err.number 0 Then
objAppointment
.Start startDate
'Utilisez soit objAppointment.Duration OU objAppointment.End, mais pas les deux
objAppointment.Duration = 5
'
objAppointment.End #12/25/2005 18:00 PM#
objAppointment.Subject "test"
objAppointment.Body "test"
objAppointment.Location "#Salle"
objAppointment.ReminderMinutesBeforeStart 10
objAppointment
.ReminderSet True
objAppointment
.display
else
msg "Veuillez démarrer Outlook avant d'appuyer sur le bouton."
MsgBox msg
end 
if
end sub
</script>
</head>
<body onload="ajouterOutlook('4/10/2006')">
</body>
</html> 
Good luck;
__________________
-Brando
Why using tables for eating is stupid!
Brandoe85 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


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

Forum Jump


All times are GMT +1. The time now is 02:58 AM.


Advertisement
Log in to turn off these ads.