Hi all

I have a VB6 application which activates the GroupWise new message dialog
with a standard message ready for the user to optionally modify the message
and hit the send button. It generally works but I'm having trouble with the
'To:' address. I use ItemSetText() to write the name of a local address
list into the 'To:' I think I need to do something more, perhaps using
AddressListCreate()? I've fiddled with that without much luck. The problems
I'm having is that sometimes the UI tells the user that the address is
invalid and prompts him to find it in the address book. It is in the
GroupWise address book. Also, when it does work, the recipient often
receives two copies. By looking at the properties in my 'Sent Items'
folder, I can see that it went both internally to 'ToAddress' and
externally to 'ToAddress@mydomain.com'. We only need it to work internally.

Here's my code

Set vGWC = CreateObject("GroupWiseCommander")

With vGWC
nRet = .Execute("NewMail()", "")
nRet = .Execute("ItemSetText(""X00"";0;""" & sTo & """)", "")
nRet = .Execute("ItemSetText(""X00"";9;""" & sSubject & """)", "")
nRet = .Execute("ItemSetText(""X00"";10;""" & sText & """)", "")
End With

Any help would be appreciated.