Trouble Calls w/ Outlook Task/Email (1 Viewer)

X-Faith

New member
Local time
Today, 15:09
Joined
Jun 19, 2003
Messages
5
OK everyone, when i do things i try and go all out. Basically i am trying to put together a trouble call log, with options to send out trouble tickets as Outlooks tasks. Second i want to be able to take those Trouble Call Logs and be albe to Email a Status Report, or even Better create a quick Excel Doc (They love Excel, every report ect is in Excel). I see alot of posts but not sure how to really implement alot of it. Well any steps in the right direction would be appreciated. Thanks

Dave
 

X-Faith

New member
Local time
Today, 15:09
Joined
Jun 19, 2003
Messages
5
Well i wanted to try and give an update.
I think i figured out how to send Tasks when the record is created. Yea me. Next question though

How can i add more the one argument to the line .
Excuse the code is being borrowed from MS while i learn :).
If you see the .Subject for Outlook tasks, i want to see if its possible to have more then one Field used?

Private Sub FinTrblCall_Click()
Dim OutlookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
On Error GoTo Err_FinTrblCall_Click


DoCmd.GoToRecord , , acNewRec
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
With OutlookTask
.Subject = Problem <----- I want this Line to Include Building/Rm/Problem
.Body = "This is the body of my task."
.ReminderSet = True
.ReminderTime = DateAdd("n", 2, Now) 'Remind 2 minutes from now.
.DueDate = DateAdd("n", 5, Now) 'Due 5 minutes from now.
.ReminderPlaySound = True
.ReminderSoundFile = "C:\Windows\Media\Ding.wav" 'Modify path.
.Save
End With

Exit_FinTrblCall_Click:
Exit Sub

Err_FinTrblCall_Click:
MsgBox Err.Description
Resume Exit_FinTrblCall_Click

End Sub
 

Fizzio

Chief Torturer
Local time
Today, 15:09
Joined
Feb 21, 2002
Messages
1,885
From your sub name, I'm assuming your code is part of a form. If you have the fields you want to add to the task avaialable on the form, it is as simple as referring to those controls in the code ie

.Subject = me.BuildingControl& " : " & me.RoomControl & " : " & me.ProblemControl

You could have any separator you want, not just the colon I have suggested and the xxxControl refers to the name of the control on the form that holds the relevant data.

hth
 

X-Faith

New member
Local time
Today, 15:09
Joined
Jun 19, 2003
Messages
5
Well i had a friend look it over and he made a few changes since i still couldnt get it to work. Right now it works as a beinging stage. If there is a cleaner way that i could do this or easier way plz let me know. Next step i am going to try and figure out how to send the tasks to differant people (4 people total) . (Our Whole IT Staff). And then im going to move on to using the act Due Dates/Reminder Date ect instead of still using MS stuff :).


Private Sub FinTrblCall_Click()
On Error GoTo Err_FinTrblCall_Click
Dim OutlookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
Dim TaskSub As String
Dim TaskBody As String
Dim Prob As String
Dim Bld As String
Dim Rm As String
TxtProb.SetFocus
Prob = TxtProb.Text
TxtBldg.SetFocus
Bld = TxtBldg.Text
TxtRm.SetFocus
Rm = TxtRm.Text
TaskSub = Bld + " RM" + Rm + " Problem: " + Prob
TxtProb.SetFocus
TaskBody = TxtProb.Text
With OutlookTask
.Subject = TaskSub
.Body = TaskBody
.ReminderSet = True
.ReminderTime = DateAdd("n", 2, Now) 'Remind 2 minutes from now.
.DueDate = DateAdd("n", 5, Now) 'Due 5 minutes from now.
.ReminderPlaySound = True
.ReminderSoundFile = "C:\Windows\Media\Ding.wav" 'Modify path.
.Save
End With
DoCmd.GoToRecord , , acNewRec
Exit_FinTrblCall_Click:
Exit Sub
Err_FinTrblCall_Click:
MsgBox Err.Description
Resume Exit_FinTrblCall_Click
End Sub
 

Users who are viewing this thread

Top Bottom