mesheree1 Absent Member.
Absent Member.
3542 views

Read Appointment-specific Message properties?

When I use VBA to read Messages from my GroupWise 7 Calendar, they seem to only have the properties of standard Message objects.
How do I gain access to a Message object's Appointment-specific properties?

Thanks!
Sheree
Labels (1)
0 Likes
9 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Read Appointment-specific Message properties?

mesheree wrote:
> When I use VBA to read Messages from my GroupWise 7 Calendar, they seem
> to only have the properties of standard Message objects.
> How do I gain access to a Message object's Appointment-specific
> properties?
>
> Thanks!
> Sheree
>
>

I would assume you cast it to an Appointment.
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Read Appointment-specific Message properties?

If you are not sure what type the item is,
you use the ClassName property. You then
assign it / cast it to the correct item
object (Mail, Appointment, etc). The Message
object is the base class upon which all of
the item types are built.

>>> On Wednesday, October 28, 2009 at 11:16 PM, Michael

Bell<mikebell90@no-mx.forums.novell.com> wrote:
> mesheree wrote:
>> When I use VBA to read Messages from my GroupWise 7 Calendar, they seem
>> to only have the properties of standard Message objects.
>> How do I gain access to a Message object's Appointment‑specific
>> properties?
>>
>> Thanks!
>> Sheree
>>
>>

> I would assume you cast it to an Appointment.

0 Likes
mesheree1 Absent Member.
Absent Member.

Re: Read Appointment-specific Message properties?

Attempting to declare the variable as an Appointment didn't work (type mismatch). I don't understand "cast". Can you show me a code example?

Preston Stephenson;1880160 wrote:
If you are not sure what type the item is,
you use the ClassName property. You then
assign it / cast it to the correct item
object (Mail, Appointment, etc). The Message
object is the base class upon which all of
the item types are built.

>>> On Wednesday, October 28, 2009 at 11:16 PM, Michael

Bell<mikebell90@no-mx.forums.novell.com> wrote:
> mesheree wrote:
>> When I use VBA to read Messages from my GroupWise 7 Calendar, they seem
>> to only have the properties of standard Message objects.
>> How do I gain access to a Message object's Appointment‑specific
>> properties?
>>
>> Thanks!
>> Sheree
>>
>>

> I would assume you cast it to an Appointment.
0 Likes
mesheree1 Absent Member.
Absent Member.

Re: Read Appointment-specific Message properties?

Oh, sorry. So I just re-set the Message object's ClassName to "GW.MESSAGE.APPOINTMENT"? I'll try that -- thanks!
0 Likes
mesheree1 Absent Member.
Absent Member.

Re: Read Appointment-specific Message properties?

Nope. The ClassName property is READ-ONLY.
0 Likes
mesheree1 Absent Member.
Absent Member.

Re: Read Appointment-specific Message properties?

I don't understand "cast".
Attempting to force the object to be an "Attachment" resulted in a Type Mismatch error. Please advise.

mikebell90;1880026 wrote:
mesheree wrote:
> When I use VBA to read Messages from my GroupWise 7 Calendar, they seem
> to only have the properties of standard Message objects.
> How do I gain access to a Message object's Appointment-specific
> properties?
>
> Thanks!
> Sheree
>
>

I would assume you cast it to an Appointment.
0 Likes
mesheree1 Absent Member.
Absent Member.

Re: Read Appointment-specific Message properties?

Found the answer in this thread... though I still have no idea what "casting" is. If anyone's Googling for the answer and finds this thread:

Basically:

  1. Declare an empty Appointment object.
  2. Loop through your Messages collection with a Message object.
  3. When you find a message that has a ClassType of "GW.MESSAGE.APPOINTMENT", assign it to the Appointment variable.

    Dim gwMsg As GroupwareTypeLibrary.Message3
    Dim gwAppt As GroupwareTypeLibrary.Appointment9

    Set gwCalMsgs = gwAcct.Calendar.Messages
    For Each gwMsg In gwCalMsgs
    If gwMsg.ClassName = "GW.MESSAGE.APPOINTMENT" Then
    Set gwAppt = gwMsg
    ' ---< Now your object is of the 'Appointment' type. >---
    End If
    Next


    mesheree;1879976 wrote:
    When I use VBA to read Messages from my GroupWise 7 Calendar, they seem to only have the properties of standard Message objects.
    How do I gain access to a Message object's Appointment-specific properties?

    Thanks!
    Sheree
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Read Appointment-specific Message properties?

mesheree wrote:
> I don't understand "cast".
> Attempting to force the object to be an "Attachment" resulted in a Type
> Mismatch error. Please advise.
>
> mikebell90;1880026 Wrote:
>> mesheree wrote:
>>> When I use VBA to read Messages from my GroupWise 7 Calendar, they

>> seem
>>> to only have the properties of standard Message objects.
>>> How do I gain access to a Message object's Appointment-specific
>>> properties?
>>>
>>> Thanks!
>>> Sheree
>>>
>>>

>> I would assume you cast it to an Appointment.

>
>


You really need to study more about VBA - it isn't our responsibility to
advise.

However, if I recall correctly, and it's been about 10 years you can dim
an object as a Variant and then do stuff to convert it into another
object. None of this discussion really belongs here.
0 Likes
mesheree1 Absent Member.
Absent Member.

Re: Read Appointment-specific Message properties?

Apparently, it's a programming thing, and since I am self-taught, I do not know all the correct terminology for everything. The hint was great, thank you... but the personal attack was not.

mikebell90;1881149 wrote:
mesheree wrote:
> I don't understand "cast".
> Attempting to force the object to be an "Attachment" resulted in a Type
> Mismatch error. Please advise.
>
> mikebell90;1880026 Wrote:
>> mesheree wrote:
>>> When I use VBA to read Messages from my GroupWise 7 Calendar, they

>> seem
>>> to only have the properties of standard Message objects.
>>> How do I gain access to a Message object's Appointment-specific
>>> properties?
>>>
>>> Thanks!
>>> Sheree
>>>
>>>

>> I would assume you cast it to an Appointment.

>
>


You really need to study more about VBA - it isn't our responsibility to
advise.

However, if I recall correctly, and it's been about 10 years you can dim
an object as a Variant and then do stuff to convert it into another
object. None of this discussion really belongs here.
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.