New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.
Absent Member.
1264 views

Deleting appointments with messageID VBA

Hello,

I'm working on a system integrating Novell Groupwise with Excel using VBA. So far I create and send appointments in Groupwise through Excel. I now want to be able to delete appointments in Groupwise.

Here's the code I have:

Sub DeleteAppt()

'Login
Set gwApplication = CreateObject("NovellGroupWareSession")
Set gwAccount = gwApplication.Login()

'Get old message
Dim gwRetrievedMsg
Set gwRetrievedMsg = gwAccount.MailBox.Messages.Item("messageIDhere")

'Delete message
gwRetrievedMsg.Delete

End Sub


So far I've just been manually entering messageIDs for different emails to test how the code works.
When the messageID input is of an email I sent, the code runs fine and deletes the email as desired. But when the messageID is of an appointment I sent, I get Run-time error '91': Object variable or With block variable not set. The debugger takes me to the "gwRetrievedMsg.Delete" line.

I thought it must have something to do with the difference between a normal email message and an appointment message. However, the code runs fine when the messageID is of an appointment sent by someone other than myself.

If anyone could shed some light about why I am getting this run-time error, it'd be very appreciated.

Thanks,
Susan
Labels (1)
0 Likes
0 Replies
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.