/ Forums / Advansys Formativ / Creating Solutions with Formativ / Attachments.Add not working in V2.02 and GW8 / Reply To: Attachments.Add not working in V2.02 and GW8

#8150
Marco
Participant

Hi,

I have found a workaround, which works for me:
Using a draft message (fgwDraft instead of fgwPersonal) you can add attachments.
This will not create a posted task, but a normal task which I have assigned to myself.

set MyNewTask = GroupWise.Account.Calendar.Messages.Add(“GW.MESSAGE.TASK”, fgwDraft)
With MyNewTask
.FromText = GroupWise.Account.Owner.DisplayName
‘.OnCalendar = FALSE
‘.Priority = fgwNormal
.AssignedDate = today
.StartDate = today
.DueDate = today
‘.Completed = FALSE
.Subject = “New job”
.TaskCategory = “A”
.TaskPriority = 1

.Attachments.Add(MyMsg)
End With

MyNewTask.Recipients.Add(GroupWise.Account.Owner.DisplayName)
MyNewtask.Send

set MyNewtask = nothing

best regards
Marco