Service Desk Practitioners Forum
cancel

Outlook 2003 - Creating an appointment from Service Desk

Highlighted
Craig R Taylor
Honored Contributor.

Outlook 2003 - Creating an appointment from Service Desk

Hi all,

I am trying to setup a smart action to create an appointment within Outlook 2003 based on information within a change control.
Right now I am just experimenting with straight command line to see if it works.

OUTLOOK /c ipm.appointment /m JJones;WShakespeare?subject=test&body=hello

I am currently able to get the subject in but not the body.
Error is: 'body' is not recognized as an internal or external command, operable program or batch file.


If I put body as a parameter by itself it will fill in the information. I've looked at this sort of thing in the forums and the way I've constructed the command appears correct. If I switch the parameters around (body first, subject second) then the second parameter creates an error.

The other issue I am having is trying to get the start date and the end date entered. I have no idea what those parameters would be called.

You can observe a lot just by watching. - YOGI BERRA
10 REPLIES
Craig R Taylor
Honored Contributor.

Re: Outlook 2003 - Creating an appointment from Service Desk

Alright, so I figured out why I wasn't able to send multiple paramters. It appears that quotes are required around the parameters.

OUTLOOK /c ipm.appointment /m "JJones;WShakespeare?subject=test&body=hello"

Unfortunately, that still leaves me with the question of how to put in the start and end times for the appointment.

Does anyone have any ideas?
You can observe a lot just by watching. - YOGI BERRA
Rolf Frydenberg
Acclaimed Contributor.

Re: Outlook 2003 - Creating an appointment from Service Desk

Hi Chris,

For sophisticated integration with Outlook, you probably need to build a small VB application. One of the best sources for information and code samples is http://www.outlookcode.com/.

HTH, Rolf F.
Craig R Taylor
Honored Contributor.

Re: Outlook 2003 - Creating an appointment from Service Desk

It appears from all indications that you cannot send the start/end time for an appointment via command line to Outlook. Rather than going with a VB solution I used a PHP solution. The code is actually quite portable, however, and could easily be ported to other languages such as JavaScript, ASP etc.
Essentially what the code does is creates a VCS file inline and the browser will then ask if you want to open or save it.

I have attached my code below. In the code I have hardcoded variables for testing but a query string could be used within Service Desk to send the variables.
example from my SmartAction in SD:
http://webhost/add2outlook2.php?CID=[ID]&SD1=[Planned Start]&ED1=[Planned Finish]&LOC=Calgary&DES=[Description]&CLA=[Impact]&RQB=[Requestor]&REF=[ID]
You can observe a lot just by watching. - YOGI BERRA
javmarlo
New Member.

Re: Outlook 2003 - Creating an appointment from Service Desk

Hi Craig:

nice piece of code but I got 2 questions

1) I get an error for trying to use Luna Calendar instead of Gregorian. Do you know how to change that param?

2) Is it possible to send the appointment to appear as a calendar item without the server asking to open or save it

Many thanks
Craig R Taylor
Honored Contributor.

Re: Outlook 2003 - Creating an appointment from Service Desk

The VCS format is pretty specific. Why it gives the error you received is strange since the problem actually has nothing to do with date/time format. A couple of rules to follow with the VCS file creation.

=0D=0A= is the "character" for end of line. As there is a limit on the length of a line I generally put these at the end of pretty much every line. It also has to be the last character in the line.

In the line before "SUMMARY;ENCODING=QUOTED-PRINTABLE:$APPSUM" the last character has to be a space otherwise it will be interpreted as one long line.

There is a maximum number of consecutive spaces allowed. I believe it is 4. Anymore than that and it thinks that you are finished. (Heck if I know why).

In terms of the other question about making it so it doesn't prompt? I'm not sure. I am working on this myself.

One problem I am encountering (and why I am writing on this topic again) is that characters like '&' and '=' are reserved characters so they need to be escaped to be passed properly. The other option is to find a way to pass the data to the PHP page without using query strings. Does anyone have any ideas on this?

You can observe a lot just by watching. - YOGI BERRA
John Chalker
Valued Contributor.

Re: Outlook 2003 - Creating an appointment from Service Desk

A few months ago I created a smart action that calls an ASP the generates VCS file with the details of an RFC. Attached is the ASP and just add a smart action that calls the ASP with the appropriate variables.

This is the example call:
http://SERVER/vcs.asp?cat=[Category]&start=[Planned Start]&end=[Planned Finish]∑=[Summary]&id=[ID]&type=RFC&atp=[Assignment;To person]


Hope that helps
John Chalker
Valued Contributor.

Re: Outlook 2003 - Creating an appointment from Service Desk

P.S.

Make sure you check "Convert fields in parameters to URL format" when adding the smart action.
Craig R Taylor
Honored Contributor.

Re: Outlook 2003 - Creating an appointment from Service Desk

That would have been bang on. I imagine that option would escape any special characters (e.g. equals and the ampersand) however that option isn't available for me. (HPSD 4.5 Sp 11). Thanks for the tip though. (Gives me another reason to promote an upgrade).

You can observe a lot just by watching. - YOGI BERRA
Leep
Respected Contributor.

Re: Outlook 2003 - Creating an appointment from Service Desk

Hi, John!
I have tested your asp script. It seems it is date format dependent.

When I have Planned Start 12/01/07 14:43 and Planned Finish 13/01/07 14:43, after press the button "GetvCalendar", it gives me start 2012-01-07 14:43 end 2013-01-07 14:43.

When I planned Start 20070112 15:21 Planned Finish 20070113 15:21, it gives me run time error:
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'strStart'

/vcs.asp, line 157


The Regional setting in my computer is Swedish. Because of this? Possible to format date format to general?

Many thanks for advice.
Lee
Leep
Respected Contributor.

Re: Outlook 2003 - Creating an appointment from Service Desk

Hi!
I tried to make date format like yyyy-MM-dd, it works perfect. :-)

Regards,
Lee