I have a problem with trying to create new GroupWise mail item from a
button in a C3PO. I require programmatic access to this via the Object
API, so it must be a saved draft. This is relativley straight forward to
do - just create a mail item using the object API, and then use the Token
API to open this item.

This worked fine in 6.5.0, however in 6.5.1 and 6.5.2 I have noticed that
when the user does a subsequent save, the body text of the message
dissappears in the GUI (it is updated correctly in the draft however) -
and all subsequent saves cause the body text to dissappear. If you close
the mail item and open the draft manually you can continue as normal.

As a test, I also tried to use the Token API to create a new mail item,
and then again to save the item in the work in progress folder. This
seems to work fine the very first time you do this, but each subsequent
time the same behaviour is seen - i.e. the body text of the email is
deleted from the GUI. Also, another observation here, event though the
mail item was saved in the WIP folder via the token API command
ItemSaveMessageDraft, it moves into the users MailBox when the user saves
it manually.

I have posted the two snippets of code from my test C3PO project at then

This is a major problem, as we need to be able to reliably create new mail
items from a toolbar button, so any help very much appreciated.




Test case 1: Create a new message object in the WIP folder, and then open
it using Token API...

Dim sRetString As String
Dim DraftMail As Object

Set DraftMail =
g_C3POManager.ClientState.CurrentAccount.WorkFolde r.Messages.Add
("GW.MESSAGE.MAIL", egwDraft)
g_Commander.Execute "ItemOpen(""" & DraftMail.MessageId & """)", sRetString


Test case 2: Create a new mail via token API, then use token API to save
the item in the WIP folder...

Dim sRetString As String

' create the new mail item...
g_Commander.Execute "NewMail()", sRetString

' Get the folder path as a string..
Dim GWFolder As Object
Dim sAccount As String
Dim sFolderPath As String

sAccount = g_C3POManager.ClientState.CurrentAccount.RootFolde r.Name

Set GWFolder = g_C3POManager.ClientState.CurrentAccount.WorkFolde r

sFolderPath = sAccount & "\" & GWFolder.Name

' dirty the message so save works...
g_Commander.Execute "ItemSetText(""X00"";Subject!;"" "")", sRetString
g_Commander.Execute "ItemSetText(""X00"";Subject!;"""")", sRetString

' do the save...
g_Commander.Execute "ItemSaveMessageDraft(""" & sFolderPath & """)",