/ Forums / Advansys Formativ / Creating Solutions with Formativ / BUG: Retreiving the Subject of CurrentItem / Reply To: BUG: Retreiving the Subject of CurrentItem
September 9, 2008 at 1:07 pm
#8026
I figured i would post the code…
' GroupWise 7+ onwards contains a localized word 'Home' after the account name.
' You will need to add the localized 'Home' after the name
if (groupwise.EnvVersionName > "7") then
iWIPPath = GroupWise.Account.Owner.DisplayName & " Home" & GroupWise.Account.WorkFolder.Name
else
iWIPPath = GroupWise.Account.Owner.DisplayName & "" & GroupWise.Account.WorkFolder.Name
end if
' Save the draft message to the Work in Progress folder
Groupwise.ItemSaveMessageDraft iWIPPath
iBreakCount = 0
while (iMsgID = "Token failed execution!") or (iMsgID = "X00")
Application.ProcessMessages
utilities.Timer 1
Application.ProcessMessages
iMsgID = GroupWise.ItemMessageIDFromView
iBreakCount = iBreakCount + 1
Utilities.Trace iBreakCount & ": " & iMsgID
if (iBreakCount > 10) then
exit sub
end if
wend
set oMsg = GroupWise.Account.GetMessage(iMsgID)
I am having a problem with:
' delete all attachments
if oMsg.Attachments.Count > 0 then
' for sndIntCounter = 1 to oMsg.Attachments.Count
for sndIntCounter = 0 to GroupWise.ItemAttachmentGetCount(oMsg.MessageID)-1
' msgbox oMsg.Attachments(sndIntCounter).DisplayName
' oMsg.Attachments(sndIntCounter).Delete
groupwise.ItemAttachmentDelete oMsg.MessageID, sndIntCounter
next
end if
seams to not delete the attachements properly. any help would be appreciated.
As you can see i tryed witht eh Formativ and Groupwise API, as the email is draft at this point.
thanks,
sam
[This message was edited by sam on September 09, 2008 at 01:16 PM.]
[This message was edited by sam on September 09, 2008 at 01:18 PM.]