Hello all!
I was given this code to create tasks in outlook, but I am not sure how to add an attachment.. Here is the code..
Now, here is the code I have that makes the attachment:
The attachment this script creates, I want to place into the task that is made by the first script and I have no idea.. Any help would be greatly appreciated!!
Thanks in advance!!!!!
Thank you!!!
Mike Kovacic
I was given this code to create tasks in outlook, but I am not sure how to add an attachment.. Here is the code..
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.")
Now, here is the code I have that makes the attachment:
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")
remedyticket.WriteLine ("Join = 0")
remedyticket.WriteLine ("Ticket = 00000000" & iklogname)
remedyticket.Close
END IF
The attachment this script creates, I want to place into the task that is made by the first script and I have no idea.. Any help would be greatly appreciated!!
Thanks in advance!!!!!
Thank you!!!
Mike Kovacic