This TID arises from a mail conversion problem when sending a task from MS Access to Groupwise using VBA. The task was arriving in the recipient's mailbox converted into a normal mail message, with the message text containing "Item Type: Task" and the start and due dates. Sample code provided.
DETAILED DESCRIPTION
A customer was trying to send a task from MS Access to Groupwise using VBA. The task was arriving in the recipient's mailbox converted into a normal mail message, with the message text containing "Item Type: Task" and the start and due dates. The question is why the message was not arriving in GroupWise Task message format.
The customer found that if she used the full email address for the recipient, i.e. name@place.com, it lost the Groupwise Task message format, but if she used the Groupwise Address Book name, i.e. "Name", it came through as a proper Groupwise Task (with Accept and Decline uttons, etc)."
The customer also says the following:
"A couple of things to mention: in Access, on the development machine, with the module window open, go to Tools, References and make sure the 'Groupwise type library' one is ticked (otherwise it produces compile errors). Otherwise, you can use the session object instead of the application object in the first part of the code (something like "NovellGroupwareSession")."
"Also, I've been finding that it throws an error on some client machines if the recipient is in the Groupwise Address Book and the Personal Address book and the Frequent contacts. I haven't found a fix for this yet..."
Here is some sample VBA code that the customer used to solve the problem.
Function GWSendTask(strTo As String, varStart, varDue, strMsg As String)
Dim objGWApp As Application2 Dim objGWAccount As Account2 Dim objGWTask As Task3
'Create and login to the application object. Set objGWApp = New Application2
'Log in to a new mailbox object using the application object Set objGWAccount = objGWApp.Login
'Add a new message/task object to the calendar. Set objGWTask = objGWAccount.Calendar.Messages.Add("GW.MESSAGE.TASK") objGWTask.OnCalendar = True
'Set up the constant bits of the mail message (edit for own purposes) Dim strFrom Dim strSubject strFrom = "User-friendly sender name " strSubject = "Task Title"
'Add the addressing info, inc. the recipient in the recipients collection objGWTask.FromText = strFrom objGWTask.Recipients.Add strTo objGWTask.Recipients.Resolve
'Set the properties of the message object. objGWTask.StartDate = varStart objGWTask.DueDate = varDue objGWTask.Subject = strSubject objGWTask.BodyText = strMsg objGWTask.NotifyWhenAccepted = egwNotify objGWTask.NotifyWhenDeclined = egwNotify
'Send the task message objGWTask.Send MsgBox "Task successfully delegated!"
'Clear up the objects Set objGWTask = Nothing Set objGWAccount = Nothing Set objGWApp = Nothing
End Function
| igwol001.exe | 28.0 K | 2005-04-06 |
--devsup
© 2009 Novell, Inc. All Rights Reserved.