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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create outlook task using standalone .vbs file 1

Status
Not open for further replies.

MrKovacic

IS-IT--Management
Nov 5, 2002
213
US
We use Remedy Corporation: Action Request System, and I am trying to create an add-on, or a separate program, that will create a reminder in outlook to address remedy tickets.

I want to be able to put in the remedy number, and when to remind me, or even a pull down to says 24 hours - 48 hours - 72 hours.. something like that..

I am looking to have a .vbs file be able to create tasks in outlook silently. And have those tasks remind the user.

Is this possible?

Thank you!!!

Mike Kovacic
 
You can create an Outlook appointment:

Code:
Set OlApp = CreateObject("Outlook.Application")
Set nsNameSpace = OlApp.GetNamespace("MAPI")
Set olFolderCalendar = nsNameSpace.GetDefaultFolder(9) 'olFolderCalendar

Set olEvent = OlApp.CreateItem(1) 'olAppointmentItem
olEvent.Start = DateAdd("n", 1, Now())
olEvent.Subject = "Hi" 
olEvent.ReminderSet = True
olEvent.ReminderMinutesBeforeStart = 1

olEvent.Save


'MsgBox ("Event created in your Outlook calendar.")

You can also add items to the windows scheduler.
 
SUPURB!!! THank you very much!!!!!!!!!



Thank you!!!

Mike Kovacic
 
One more quick question... How is the date formatted?

also, can an attachment be added to this?

I created a script to create a shortcut file for remedy shown below:

Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
iklogname = InputBox("Input your Remedy Ticket number (not including the zeros.)")
If iklogname = "" Then
Wscript.Quit 1
Else
DIM fso, GuyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set remedyticket = fso.CreateTextFile("RemedyTicket " & iklogname & ".ARTask", True)
remedyticket.WriteLine("[Shortcut]") 
remedyticket.WriteLine ("Name = HPD:HelpDesk") 
remedyticket.WriteLine ("Type = 0") 
remedyticket.WriteLine ("Server = our.remedy.server.com") 
remedyticket.WriteLine ("Join = 0") 
remedyticket.WriteLine ("Ticket = 00000000" & iklogname) 
remedyticket.Close
END IF

This is just part of the script that should place a remedy task file in a temp directory so it can be attached.

OR

Can i make one VBS file that has the attachment coded into it?


Thank you!!!

Mike Kovacic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top