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.
Anonymous_User Absent Member.
Absent Member.
2612 views

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
Labels (1)
0 Likes
7 Replies
Anonymous_User Absent Member.
Absent Member.

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


0 Likes
Anonymous_User Absent Member.
Absent Member.

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
>
>


0 Likes
Anonymous_User Absent Member.
Absent Member.

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
>
>




0 Likes
Anonymous_User Absent Member.
Absent Member.

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
> >
> >

>
>
>


0 Likes
Anonymous_User Absent Member.
Absent Member.

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
> >
> >

>
>
>




0 Likes
Highlighted
Anonymous_User Absent Member.
Absent Member.

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
>


0 Likes
Anonymous_User Absent Member.
Absent Member.

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
>




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.