Home

Results 1 to 8 of 8

Thread: GW 6.5 Tokens and ItemGetText

  1. #1
    cmcdermaid@genesco.com NNTP User

    GW 6.5 Tokens and ItemGetText

    Greetings,

    I have a VBA program that opens E-mails and saves attachments from those E-
    mails to specific directories based on the sender, subject and the
    attachment name. We are in the testing stages of 6.5 and the following
    code does not work as it does in our current version:

    bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";1)", sFromName)
    bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";9)", sSubjectText)

    In our current version, sFromName gets the From name and sSubjectText gets
    the subject line. In 6.5, they both comeback empty (""). Any help is
    appreciated.

    Cory McDermaid

  2. #2
    Corbett Morrow NNTP User

    Re: GW 6.5 Tokens and ItemGetText

    Should there not be encapsulating quotes around the sMessId:

    bOk = oGWComm.Execute("ItemGetText(""" & sMessId & """;1)", sFromName)

    Regards
    Corbett

    >>> <cmcdermaid@genesco.com> 19-Nov-2004 21:16 >>>

    Greetings,

    I have a VBA program that opens E-mails and saves attachments from those E-
    mails to specific directories based on the sender, subject and the
    attachment name. We are in the testing stages of 6.5 and the following
    code does not work as it does in our current version:

    bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";1)", sFromName)
    bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";9)", sSubjectText)

    In our current version, sFromName gets the From name and sSubjectText gets
    the subject line. In 6.5, they both comeback empty (""). Any help is
    appreciated.

    Cory McDermaid



  3. #3
    cmcdermaid@genesco.com NNTP User

    Re: GW 6.5 Tokens and ItemGetText

    Thank you for your reply Corbett.

    I define sMessID as

    sMessId = Chr(34) & "X00" & Chr(34)

    which, in effect, adds the encapsulating quotes around the sMessId.

    This token worked very well in GW 6.2.

    There are some differences that I have noticed between 6.2 and 6.5 that I
    think might be affecting this token.

    In 6.2, the FROM and SUBJECT areas of a sent e-mail display the completed
    information using textboxes which appear to be identical to the textboxes
    used when composing an E-mail.

    IN 6.5, the FROM and SUBJECT appear in the gray area at the top of a sent
    E-mail and are not in the form of a textbox. The composing of an E-mail
    still uses textboxes for the FROM and SUBJECT.

    This leads my reasoning to suspect that the fact that the FROM and SUBJECT
    of a sent E-mail are not in "textboxes" makes the ItemGetText token to
    fail in my scenario.

    Is there another token that I am missing that can accomplish this task?
    Would more code be of help?

    Thanks in advance!

    Cory


    > Should there not be encapsulating quotes around the sMessId:
    >
    > bOk = oGWComm.Execute("ItemGetText(""" & sMessId & """;1)", sFromName)
    >
    > Regards
    > Corbett
    >
    > >>> <cmcdermaid@genesco.com> 19-Nov-2004 21:16 >>>

    > Greetings,
    >
    > I have a VBA program that opens E-mails and saves attachments from those

    E-
    > mails to specific directories based on the sender, subject and the
    > attachment name. We are in the testing stages of 6.5 and the following
    > code does not work as it does in our current version:
    >
    > bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";1)", sFromName)
    > bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";9)", sSubjectText)
    >
    > In our current version, sFromName gets the From name and sSubjectText

    gets
    > the subject line. In 6.5, they both comeback empty (""). Any help is
    > appreciated.
    >
    > Cory McDermaid
    >
    >



  4. #4
    Corbett Morrow NNTP User

    Re: GW 6.5 Tokens and ItemGetText

    Cory

    I am using GW 6.5 SP2 and just tried this out with a new message (X00) and with a received message and both worked fine. If you are not using SP2 I would suggest trying it.

    Regards
    Corbett

    >>> <cmcdermaid@genesco.com> 02-Dec-2004 13:40 >>>

    Thank you for your reply Corbett.

    I define sMessID as

    sMessId = Chr(34) & "X00" & Chr(34)

    which, in effect, adds the encapsulating quotes around the sMessId.

    This token worked very well in GW 6.2.

    There are some differences that I have noticed between 6.2 and 6.5 that I
    think might be affecting this token.

    In 6.2, the FROM and SUBJECT areas of a sent e-mail display the completed
    information using textboxes which appear to be identical to the textboxes
    used when composing an E-mail.

    IN 6.5, the FROM and SUBJECT appear in the gray area at the top of a sent
    E-mail and are not in the form of a textbox. The composing of an E-mail
    still uses textboxes for the FROM and SUBJECT.

    This leads my reasoning to suspect that the fact that the FROM and SUBJECT
    of a sent E-mail are not in "textboxes" makes the ItemGetText token to
    fail in my scenario.

    Is there another token that I am missing that can accomplish this task?
    Would more code be of help?

    Thanks in advance!

    Cory


    > Should there not be encapsulating quotes around the sMessId:
    >
    > bOk = oGWComm.Execute("ItemGetText(""" & sMessId & """;1)", sFromName)
    >
    > Regards
    > Corbett
    >
    > >>> <cmcdermaid@genesco.com> 19-Nov-2004 21:16 >>>

    > Greetings,
    >
    > I have a VBA program that opens E-mails and saves attachments from those

    E-
    > mails to specific directories based on the sender, subject and the
    > attachment name. We are in the testing stages of 6.5 and the following
    > code does not work as it does in our current version:
    >
    > bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";1)", sFromName)
    > bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";9)", sSubjectText)
    >
    > In our current version, sFromName gets the From name and sSubjectText

    gets
    > the subject line. In 6.5, they both comeback empty (""). Any help is
    > appreciated.
    >
    > Cory McDermaid
    >
    >





  5. #5
    cmcdermaid@genesco.com NNTP User

    Re: GW 6.5 Tokens and ItemGetText

    Corbett,

    I confirmed with our GW admin that we are using SP2. I am still at a loss.
    Can you provide the code that you used to test? Any help is greatly
    appreciated.

    Cory

    > Cory
    >
    > I am using GW 6.5 SP2 and just tried this out with a new message (X00)

    and with a received message and both worked fine. If you are not using
    SP2 I would suggest trying it.
    >
    > Regards
    > Corbett
    >
    > >>> <cmcdermaid@genesco.com> 02-Dec-2004 13:40 >>>

    > Thank you for your reply Corbett.
    >
    > I define sMessID as
    >
    > sMessId = Chr(34) & "X00" & Chr(34)
    >
    > which, in effect, adds the encapsulating quotes around the sMessId.
    >
    > This token worked very well in GW 6.2.
    >
    > There are some differences that I have noticed between 6.2 and 6.5 that

    I
    > think might be affecting this token.
    >
    > In 6.2, the FROM and SUBJECT areas of a sent e-mail display the

    completed
    > information using textboxes which appear to be identical to the

    textboxes
    > used when composing an E-mail.
    >
    > IN 6.5, the FROM and SUBJECT appear in the gray area at the top of a

    sent
    > E-mail and are not in the form of a textbox. The composing of an E-mail
    > still uses textboxes for the FROM and SUBJECT.
    >
    > This leads my reasoning to suspect that the fact that the FROM and

    SUBJECT
    > of a sent E-mail are not in "textboxes" makes the ItemGetText token to
    > fail in my scenario.
    >
    > Is there another token that I am missing that can accomplish this task?
    > Would more code be of help?
    >
    > Thanks in advance!
    >
    > Cory
    >
    >
    > > Should there not be encapsulating quotes around the sMessId:
    > >
    > > bOk = oGWComm.Execute("ItemGetText(""" & sMessId & """;1)", sFromName)
    > >
    > > Regards
    > > Corbett
    > >
    > > >>> <cmcdermaid@genesco.com> 19-Nov-2004 21:16 >>>

    > > Greetings,
    > >
    > > I have a VBA program that opens E-mails and saves attachments from

    those
    > E-
    > > mails to specific directories based on the sender, subject and the
    > > attachment name. We are in the testing stages of 6.5 and the following
    > > code does not work as it does in our current version:
    > >
    > > bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";1)", sFromName)
    > > bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";9)", sSubjectText)
    > >
    > > In our current version, sFromName gets the From name and sSubjectText

    > gets
    > > the subject line. In 6.5, they both comeback empty (""). Any help is
    > > appreciated.
    > >
    > > Cory McDermaid
    > >
    > >

    >
    >
    >



  6. #6
    Corbett Morrow NNTP User

    Re: GW 6.5 Tokens and ItemGetText

    Cory

    Just confirm that your Groupwise client is 6.5.2 (under Help - > About Groupwise)

    The following code works for me. Note that I am only using the ItemMessageIDFromView() to give me a Message ID. This approach only works if you have a message open in the Groupwise client. You are probably retrieving your Message ID in some other way.

    Sub ShowStuff
    Dim GWDDE As Object
    Dim vMessID As String
    Dim vSuccess As Long
    Dim vFromName As String, vSubject As String

    Set GWDDE = CreateObject("GroupWiseCommander")
    '
    ' Make sure you have a message open on screen and get its Message ID
    '
    vSuccess = GWDDE.Execute("ItemMessageIDFromView()", vMessID)
    '
    ' Now get the Name and Subject
    '
    vSuccess = GWDDE.Execute("ItemGetText(""" & vMessID & """;1)", vFromName)
    vSuccess = GWDDE.Execute("ItemGetText(""" & vMessID & """;9)", vSubject)
    MsgBox "Mail from " & vFromName & vbCrLf & "has subject " & vSubject
    Set GWDDE = Nothing
    End Sub

    >>> <cmcdermaid@genesco.com> 03-Dec-04 14:34 >>>

    Corbett,

    I confirmed with our GW admin that we are using SP2. I am still at a loss.
    Can you provide the code that you used to test? Any help is greatly
    appreciated.

    Cory

    > Cory
    >
    > I am using GW 6.5 SP2 and just tried this out with a new message (X00)

    and with a received message and both worked fine. If you are not using
    SP2 I would suggest trying it.
    >
    > Regards
    > Corbett
    >
    > >>> <cmcdermaid@genesco.com> 02-Dec-2004 13:40 >>>

    > Thank you for your reply Corbett.
    >
    > I define sMessID as
    >
    > sMessId = Chr(34) & "X00" & Chr(34)
    >
    > which, in effect, adds the encapsulating quotes around the sMessId.
    >
    > This token worked very well in GW 6.2.
    >
    > There are some differences that I have noticed between 6.2 and 6.5 that

    I
    > think might be affecting this token.
    >
    > In 6.2, the FROM and SUBJECT areas of a sent e-mail display the

    completed
    > information using textboxes which appear to be identical to the

    textboxes
    > used when composing an E-mail.
    >
    > IN 6.5, the FROM and SUBJECT appear in the gray area at the top of a

    sent
    > E-mail and are not in the form of a textbox. The composing of an E-mail
    > still uses textboxes for the FROM and SUBJECT.
    >
    > This leads my reasoning to suspect that the fact that the FROM and

    SUBJECT
    > of a sent E-mail are not in "textboxes" makes the ItemGetText token to
    > fail in my scenario.
    >
    > Is there another token that I am missing that can accomplish this task?
    > Would more code be of help?
    >
    > Thanks in advance!
    >
    > Cory
    >
    >
    > > Should there not be encapsulating quotes around the sMessId:
    > >
    > > bOk = oGWComm.Execute("ItemGetText(""" & sMessId & """;1)", sFromName)
    > >
    > > Regards
    > > Corbett
    > >
    > > >>> <cmcdermaid@genesco.com> 19-Nov-2004 21:16 >>>

    > > Greetings,
    > >
    > > I have a VBA program that opens E-mails and saves attachments from

    those
    > E-
    > > mails to specific directories based on the sender, subject and the
    > > attachment name. We are in the testing stages of 6.5 and the following
    > > code does not work as it does in our current version:
    > >
    > > bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";1)", sFromName)
    > > bOk = oGWComm.Execute("ItemGetText(" & sMessId & ";9)", sSubjectText)
    > >
    > > In our current version, sFromName gets the From name and sSubjectText

    > gets
    > > the subject line. In 6.5, they both comeback empty (""). Any help is
    > > appreciated.
    > >
    > > Cory McDermaid
    > >
    > >

    >
    >
    >





  7. #7
    cmcdermaid@genesco.com NNTP User

    Re: GW 6.5 Tokens and ItemGetText

    Your sugestion worked. In the past I used X00 as the messageid for any
    open message.

    Thanks!



    > Cory
    >
    > Just confirm that your Groupwise client is 6.5.2 (under Help - > About

    Groupwise)
    >
    > The following code works for me. Note that I am only using the

    ItemMessageIDFromView() to give me a Message ID. This approach only works
    if you have a message open in the Groupwise client. You are probably
    retrieving your Message ID in some other way.
    >
    > Sub ShowStuff
    > Dim GWDDE As Object
    > Dim vMessID As String
    > Dim vSuccess As Long
    > Dim vFromName As String, vSubject As String
    >
    > Set GWDDE = CreateObject("GroupWiseCommander")
    > '
    > ' Make sure you have a message open on screen and get its Message ID
    > '
    > vSuccess = GWDDE.Execute("ItemMessageIDFromView()", vMessID)
    > '
    > ' Now get the Name and Subject
    > '
    > vSuccess = GWDDE.Execute("ItemGetText(""" & vMessID & """;1)",

    vFromName)
    > vSuccess = GWDDE.Execute("ItemGetText(""" & vMessID & """;9)",

    vSubject)
    > MsgBox "Mail from " & vFromName & vbCrLf & "has subject " & vSubject
    > Set GWDDE = Nothing
    > End Sub
    >



  8. #8
    Corbett Morrow NNTP User

    Re: GW 6.5 Tokens and ItemGetText

    It's nice when things work. It is much more satisfactory than the alternative.

    Corbett

    >>> <cmcdermaid@genesco.com> 07-Dec-2004 22:50 >>>

    Your sugestion worked. In the past I used X00 as the messageid for any
    open message.

    Thanks!



    > Cory
    >
    > Just confirm that your Groupwise client is 6.5.2 (under Help - > About

    Groupwise)
    >
    > The following code works for me. Note that I am only using the

    ItemMessageIDFromView() to give me a Message ID. This approach only works
    if you have a message open in the Groupwise client. You are probably
    retrieving your Message ID in some other way.
    >
    > Sub ShowStuff
    > Dim GWDDE As Object
    > Dim vMessID As String
    > Dim vSuccess As Long
    > Dim vFromName As String, vSubject As String
    >
    > Set GWDDE = CreateObject("GroupWiseCommander")
    > '
    > ' Make sure you have a message open on screen and get its Message ID
    > '
    > vSuccess = GWDDE.Execute("ItemMessageIDFromView()", vMessID)
    > '
    > ' Now get the Name and Subject
    > '
    > vSuccess = GWDDE.Execute("ItemGetText(""" & vMessID & """;1)",

    vFromName)
    > vSuccess = GWDDE.Execute("ItemGetText(""" & vMessID & """;9)",

    vSubject)
    > MsgBox "Mail from " & vFromName & vbCrLf & "has subject " & vSubject
    > Set GWDDE = Nothing
    > End Sub
    >





Posting Permissions

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