Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create outlook appointment from asp? 1

Status
Not open for further replies.

hithere

Programmer
Jul 12, 2001
214
US
I want to send an outlook appointment email from an asp page. Can anyone point me to a page that explains how?
Thanx in advance! ( code would be okay too! ;-) )
mb
:) "Where's the Ka-Boom? There's supposed to be an Earth-shattering Ka-Boom!"
Marvin the Martian
 
Did you ever figure this out? I am having much the same problem.
 
not exactly. I found a page that gave some explanation:


but haven't really had opportunity to try putting it into practice yet. when I found this, we then started switching to cdonts as a first step. now that that's completed and I can try to work with this a little more. I also was trying to see if there was a way to do an "auto-lookup" for email addys but I'm thinkin' that would require access to our exchange server which our IS folks might like allowing.

the original idea was that when a person was signing up for training or shifts, I could place an appointment in their outlook calendar just by reading their NT login and doing a match for their email addy. if you get it to work I'd love to hear.
mb

"Where's the Ka-Boom? There's supposed to be an Earth-shattering Ka-Boom!"
Marvin the Martian
 
Hi,

I eventually figured it out with some help from the web, can't remember where though. The following code places an appointment in a desired person outlook calendar.

Set objOLApp = CreateObject("Outlook.Application")
Set objNS = objOLApp.GetNamespace("MAPI")
strUser = "Place email address of persons calendar you wish to add to"
Set objRecip = objNS.CreateRecipient(strUser)
objRecip.Resolve
Set objFolder = objNS.GetSharedDefaultFolder(objRecip, 9)
Set objAppt = objFolder.Items.Add
With objAppt
'Set the appointment properties here
.Subject = "TEST"
.Body = "Sorry for the inconvenience - Done from the intranet"
.Start = "23/June/2004 " & "12:15"
.Save
End With


Cheers
 
Cool! Thanks!
mb

"Where's the Ka-Boom? There's supposed to be an Earth-shattering Ka-Boom!"
Marvin the Martian
 
Plsh -
I'm more of a Coldfusion person so I'll be 100% honest that your above code makes little or no sense to me, but I'm willing to give it a shot!

I just need to know what script this, is this VBScript, .NET, etc.

If you could post the full page code, that would be incredible!

Thanks!
 
I was using VBscript.

"Where's the Ka-Boom? There's supposed to be an Earth-shattering Ka-Boom!"
Marvin the Martian
 
Hi VArnix,

Yup, hithere is correct, it is VB Script in normal ASP code. It should be to be converted to .NET as well if ned be. Just ensure that the user has sufficient rights to update other peoples calendar. The major problem I had when testing is that a lot of the people did not have rights to other peoples calendar, which resulted in the code running but not doing anything, very irratating. I eventually ended up created a small vb 6 application and placeing the code in the executable and from that executable, which would sit on the server, update the users calendar. The user that logs into the server is an administrator and works fine like this no hassels as all takes place on the server. I guess you could also use server side scripting to get it to work though.

Hope this helps.

Cheers
 
plsh... besides the above code, what might I need to have installed on my server to get the sample code working?

I tried a copy/paste of the code, replacing the "strUser" string and testing... but nothing seems to happen. Not even an error.

Thanks in advance.

Earnie Eng
 
Okay... with my previous Post... I take that back that there is no error...

I did get an error:

[blue]Microsoft VBScript runtime error '800a01ad'

ActiveX component can't create object: 'Outlook.Application'

/temp/testOutlookAppointment.asp, line 4 [/blue]

I'm just exploring the tip of the iceburg here and wanted to see if anyone could help be get started.

I've developed a web based gui for a database that tracks critical information on lawsuits against us... It also has a table to schedule reminders, and I would like to have the application send an outlook calender event to the current user's Outlook Exchange account with the reminder.

Any thoughts?

Earnie Eng
 
Not sure since it's an active x error. would make me wonder if there's an update to the outlook version that's being run or the server components as the code may trying to use a control that's not there (installed). have you googled the error #?

I would also, as mentioned in a previous post (above), check the permissions (just to be sure that you can write to the users calendar).

another thought as a possible short term work around. instead of a calendar event, send an email notifying the user to create the event until you get the problem figured out.

"Where's the Ka-Boom? There's supposed to be an Earth-shattering Ka-Boom!"
Marvin the Martian
 
Yes... I was suspecting it has to do with Outlook not being installed. Currently I run ASPMail to send emails, which uses our exchange server's ip (not the same box) to send email.

Would it be possible to instantiate an Outlook object w/o having outlook installed by referring to the exchange server?

is there a free (no additional money out of pocket) version of Outlook I can install on my web server?

I think the code makes sense, but I need some help on how to configure my server.

I'm running
- Windows Server 2000
- IIS 5.0
- Classic ASP (not .NET)
- ASPMail -> using a different server for the mail server

Earnie Eng
 
not being a server guy I'm out of my depth here but...just as a stab at it.

I would think that if you can find the COM object that is being used, you install that (or them) onto the server and get by. Anybody know servers that can answer better?

free outlook? from M$ - pull the other one! :)

"Where's the Ka-Boom? There's supposed to be an Earth-shattering Ka-Boom!"
Marvin the Martian
 
Well.. I figure that if I already have Exchange installed, that M$ would also give me the tools to mess with it, even remotely from a different server?

nah... I already PAID for it!

Earnie Eng
 
Just to keep the length of the thread down, I thought I'd re-state my question in a new thread: thread333-1003752

Earnie Eng
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top