Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
wiassaibling Absent Member.
Absent Member.
1957 views

Crash in VBA with new GW Client 8.0.2

Hi @ all,

we use the GW API in a Word VBA Process.
After the Client update from 8.0.1 to 8.0.2 wie have problems.
The Word VBA an the Word application will hang up after the Process.

We use API Call as follow:

Set GW = CreateObject("NovellGroupWareSession")
Set GWAccount = GW.Login()
Set GWAddrBook = GWAccount.AddressBooks("Primärbuch")
Set GWAddrBooks = GWAccount.AddressBooks

Set Acc = GW.Login
Set GWMailFolder = Acc.Mailbox
Set GWMessages = GWMailFolder.Messages
Set GWDraftMsg = GWMessages.Add("GW.MESSAGE.MAIL", "Draft")

....
// Mail Process //

If SinSendOpt <> 2 Then
' Open the new message to view it and add recipient(s) manually
GWMsgID = GWMessage.MessageID
Set vCommander = CreateObject("GroupWiseCommander")
ParamStr = "ItemOpen(""" + GWMsgID + """)"
iRet = vCommander.Execute(ParamStr, sResult)
GWMessage.Delete


Else
' Direkt senden
GWMessage.Send
GWMessage.Delete
MsgBox "Ihre Mail wurde gesendet!", vbInformation, "Mail sent"


End If
...

End Sub

At that moment, the program will crash.

kann mit jemand helfen oder hat jemand die gleichen erfahrungen?

Thank you
Franky

Helmut Frank Germany
Labels (1)
0 Likes
2 Replies
wiassaibling Absent Member.
Absent Member.

Re: Crash in VBA with new GW Client 8.0.2

The last sentence should of course be like this :-))

"can help someone or someone has the same experiences?"

Helmut Frank Germany
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Crash in VBA with new GW Client 8.0.2

>> At that moment, the program will crash.
At what moment??? Have you debugged step by step?

I suppose yor app crashes at the following lines of code:
[...snip]
> ' Direkt senden
> GWMessage.Send
> GWMessage.Delete

[...snip]

I could not find the declaration of 'GWMessage' in your code snipplet; what is
'GWMessage' in fact?
I suppose 'GWMessage' ist your 'sendable draft'?
If so, you try to delete the 'Draft', which is automatically deleted when the message
is sent.

I would rather do it that way:
' oMsgSent is of type 'Object' (late binding)
oMsgSent = GWMessage.Send
oMsgSent.Delete



regards,
Markus



"wiassaibling" <wiassaibling@no-mx.forums.novell.com> schrieb im Newsbeitrag
news:wiassaibling.4h6dbz@no-mx.forums.novell.com...
>
> Hi @ all,
>
> we use the GW API in a Word VBA Process.
> After the Client update from 8.0.1 to 8.0.2 wie have problems.
> The Word VBA an the Word application will hang up after the Process.
>
> We use API Call as follow:
>
> Set GW = CreateObject("NovellGroupWareSession")
> Set GWAccount = GW.Login()
> Set GWAddrBook = GWAccount.AddressBooks("Primärbuch")
> Set GWAddrBooks = GWAccount.AddressBooks
>
> Set Acc = GW.Login
> Set GWMailFolder = Acc.Mailbox
> Set GWMessages = GWMailFolder.Messages
> Set GWDraftMsg = GWMessages.Add("GW.MESSAGE.MAIL", "Draft")
>
> ...
> // Mail Process //
>
> If SinSendOpt <> 2 Then
> ' Open the new message to view it and add recipient(s) manually
> GWMsgID = GWMessage.MessageID
> Set vCommander = CreateObject("GroupWiseCommander")
> ParamStr = "ItemOpen(""" + GWMsgID + """)"
> iRet = vCommander.Execute(ParamStr, sResult)
> GWMessage.Delete
>
>
> Else
> ' Direkt senden
> GWMessage.Send
> GWMessage.Delete
> MsgBox "Ihre Mail wurde gesendet!", vbInformation, "Mail sent"
>
>
> End If
> ..
>
> END SUB
>
> At that moment, the program will crash.
>
> kann mit jemand helfen oder hat jemand die gleichen erfahrungen?
>
> Thank you
> Franky
>
>
> --
> Helmut Frank
> Germany
> ------------------------------------------------------------------------
> wiassaibling's Profile: http://forums.novell.com/member.php?userid=51056
> View this thread: http://forums.novell.com/showthread.php?t=420676
>



0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.