A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Step Mode Values



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 8th 06, 01:21 AM posted to microsoft.public.outlook.program_vba
Joel
external usenet poster
 
Posts: 48
Default Step Mode Values

TIA:

When running through code in Step Mode when I put my cursor over a variable
or item property, I see a caption with the current value. Can I really trust
that this is the exact value (case sensistive text) that would need to be in
code to match an eqaulity statement ie if I see a value of then
for my If to be true I would need If reciepient.address =
Then...

The issue is the caption in Step Mode shows a value in all CAPS but the data
itself is mixed upper and lower case. I know my code is case sensitive to
the "actual" email address used in the email To: field.

I would hope a way around is to set a variable for email address and LCase
the data...

Thanks for any help,

Joel
Ads
  #2  
Old December 8th 06, 07:43 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Step Mode Values



Yes, you can trust the Debugger. At least I could always do that. As for
e-mail addresses: They aren't case sensitive and so your code should treat
them, you never know what a user enters. Due to that for comparing values I
always convert them with LCASE.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Am Thu, 7 Dec 2006 16:21:01 -0800 schrieb Joel:

TIA:

When running through code in Step Mode when I put my cursor over a

variable
or item property, I see a caption with the current value. Can I really

trust
that this is the exact value (case sensistive text) that would need to be

in
code to match an eqaulity statement ie if I see a value of

then
for my If to be true I would need If reciepient.address =


Then...

The issue is the caption in Step Mode shows a value in all CAPS but the

data
itself is mixed upper and lower case. I know my code is case sensitive to
the "actual" email address used in the email To: field.

I would hope a way around is to set a variable for email address and LCase
the data...

Thanks for any help,

Joel

  #3  
Old December 9th 06, 12:20 AM posted to microsoft.public.outlook.program_vba
Joel
external usenet poster
 
Posts: 48
Default Step Mode Values

Hello Michael:

FYI, I found the value of Recipient.Addess to definetly to be case sensitive.

Also I used the Watch window to show me the value of the Recipient.Address
and upon copy and paste the value into code all worked fine. The data in
the caption when I looked at values in Step Mode showed all CAPS which in not
how the watch window showed the data and being case sensitive made the
difference.

Thanks,
Joel

"Michael Bauer [MVP - Outlook]" wrote:



Yes, you can trust the Debugger. At least I could always do that. As for
e-mail addresses: They aren't case sensitive and so your code should treat
them, you never know what a user enters. Due to that for comparing values I
always convert them with LCASE.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Am Thu, 7 Dec 2006 16:21:01 -0800 schrieb Joel:

TIA:

When running through code in Step Mode when I put my cursor over a

variable
or item property, I see a caption with the current value. Can I really

trust
that this is the exact value (case sensistive text) that would need to be

in
code to match an eqaulity statement ie if I see a value of

then
for my If to be true I would need If reciepient.address =


Then...

The issue is the caption in Step Mode shows a value in all CAPS but the

data
itself is mixed upper and lower case. I know my code is case sensitive to
the "actual" email address used in the email To: field.

I would hope a way around is to set a variable for email address and LCase
the data...

Thanks for any help,

Joel


  #4  
Old December 9th 06, 09:56 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Step Mode Values



Joel, there's a small but important difference: e-mail adresses aren't
case-sensitive but string comparisons are. VB(A) doesn't know the meaning of
a string, it can't determine whether a string is an e-mail address or
something else.

The user enters the e-mail address, either in an e-mail or a contact. And
you never know if the address is entered in lower cases or not, because for
the user (and for delivering e-mails) it makes no difference. That is, the
same user can enter the same address once in lower cases and once in upper
ones. You code must recognize both as equal adresses, so for being sure
convert them all either in lower or upper cases.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Am Fri, 8 Dec 2006 15:20:00 -0800 schrieb Joel:

Hello Michael:

FYI, I found the value of Recipient.Addess to definetly to be case

sensitive.

Also I used the Watch window to show me the value of the Recipient.Address
and upon copy and paste the value into code all worked fine. The data in
the caption when I looked at values in Step Mode showed all CAPS which in

not
how the watch window showed the data and being case sensitive made the
difference.

Thanks,
Joel

"Michael Bauer [MVP - Outlook]" wrote:



Yes, you can trust the Debugger. At least I could always do that. As for
e-mail addresses: They aren't case sensitive and so your code should

treat
them, you never know what a user enters. Due to that for comparing values

I
always convert them with LCASE.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Am Thu, 7 Dec 2006 16:21:01 -0800 schrieb Joel:

TIA:

When running through code in Step Mode when I put my cursor over a

variable
or item property, I see a caption with the current value. Can I really

trust
that this is the exact value (case sensistive text) that would need to

be
in
code to match an eqaulity statement ie if I see a value of

then
for my If to be true I would need If reciepient.address =


Then...

The issue is the caption in Step Mode shows a value in all CAPS but the

data
itself is mixed upper and lower case. I know my code is case sensitive

to
the "actual" email address used in the email To: field.

I would hope a way around is to set a variable for email address and

LCase
the data...

Thanks for any help,

Joel


  #5  
Old December 9th 06, 02:43 PM posted to microsoft.public.outlook.program_vba
Joel
external usenet poster
 
Posts: 48
Default Step Mode Values

Hello Michael:

Thanks so much for the clarification, I do understand what you are saying.

Joel

"Michael Bauer [MVP - Outlook]" wrote:



Joel, there's a small but important difference: e-mail adresses aren't
case-sensitive but string comparisons are. VB(A) doesn't know the meaning of
a string, it can't determine whether a string is an e-mail address or
something else.

The user enters the e-mail address, either in an e-mail or a contact. And
you never know if the address is entered in lower cases or not, because for
the user (and for delivering e-mails) it makes no difference. That is, the
same user can enter the same address once in lower cases and once in upper
ones. You code must recognize both as equal adresses, so for being sure
convert them all either in lower or upper cases.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Am Fri, 8 Dec 2006 15:20:00 -0800 schrieb Joel:

Hello Michael:

FYI, I found the value of Recipient.Addess to definetly to be case

sensitive.

Also I used the Watch window to show me the value of the Recipient.Address
and upon copy and paste the value into code all worked fine. The data in
the caption when I looked at values in Step Mode showed all CAPS which in

not
how the watch window showed the data and being case sensitive made the
difference.

Thanks,
Joel

"Michael Bauer [MVP - Outlook]" wrote:



Yes, you can trust the Debugger. At least I could always do that. As for
e-mail addresses: They aren't case sensitive and so your code should

treat
them, you never know what a user enters. Due to that for comparing values

I
always convert them with LCASE.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Am Thu, 7 Dec 2006 16:21:01 -0800 schrieb Joel:

TIA:

When running through code in Step Mode when I put my cursor over a
variable
or item property, I see a caption with the current value. Can I really
trust
that this is the exact value (case sensistive text) that would need to

be
in
code to match an eqaulity statement ie if I see a value of
then
for my If to be true I would need If reciepient.address =

Then...

The issue is the caption in Step Mode shows a value in all CAPS but the
data
itself is mixed upper and lower case. I know my code is case sensitive

to
the "actual" email address used in the email To: field.

I would hope a way around is to set a variable for email address and

LCase
the data...

Thanks for any help,

Joel


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i change outlook 2003 back to regular mode from "safe mode CCSMUDGE Outlook - Installation 0 July 5th 06 02:26 AM
Safe mode starts instantly, normal mode takes 5 minutes - why? steve m Outlook - General Queries 3 June 18th 06 01:37 AM
block spam: step 1 auto reply to unknown sender's with a code PatB Outlook - Installation 2 June 13th 06 04:54 AM
Outlook should have a mini-mode, like Media Player's mini-mode. glen Outlook - General Queries 1 February 27th 06 07:16 PM
Next Step in Programming for Office C.W. Billow Outlook and VBA 1 January 23rd 06 03:24 PM


All times are GMT +1. The time now is 06:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.