Home

Results 1 to 10 of 10

Thread: Read Appointment-specific Message properties?

  1. #1

    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

  2. #2
    mikebell90 NNTP User

    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.

  3. #3
    Preston Stephenson NNTP User

    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.


  4. #4

    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?

    Quote Originally Posted by Preston Stephenson View Post
    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.

  5. #5

    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!

  6. #6

    Re: Read Appointment-specific Message properties?

    Nope. The ClassName property is READ-ONLY.

  7. #7

    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.

    Quote Originally Posted by mikebell90 View Post
    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.

  8. #8

    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.

    Code:
    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
    Quote Originally Posted by mesheree View Post
    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

  9. #9
    mikebell90 NNTP User

    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.

  10. #10

    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.

    Quote Originally Posted by mikebell90 View Post
    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •