473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Why does ?StrConv("SomeAddr@SomeDomain.net", vbFromUnicode) yield ??????????? debug window?

MLH
?StrConv("So******@SomeDomain.net", vbFromUnicode)
???????????

When I use StrConv in the manner shown above, a bunch
of question marks is all I ever see returned. Why might that be?
Of what real use is StrConv? Can you give me a useful case
example?
Mar 28 '07 #1
3 3772
On Wed, 28 Mar 2007 09:21:47 -0400, MLH <CR**@NorthState.netwrote:

Perhaps because it was late, and you meant to write:
?StrConv("So******@SomeDomain.net", vbUnicode)

Btw, your code also worked, but it yields unprintable characters. Just
use the Len and LenB functions on your line.

-Tom.

>?StrConv("So******@SomeDomain.net", vbFromUnicode)
???????????

When I use StrConv in the manner shown above, a bunch
of question marks is all I ever see returned. Why might that be?
Of what real use is StrConv? Can you give me a useful case
example?
Mar 28 '07 #2
On Mar 28, 9:21 am, MLH <C...@NorthState.netwrote:
?StrConv("SomeA...@SomeDomain.net", vbFromUnicode)
???????????

When I use StrConv in the manner shown above, a bunch
of question marks is all I ever see returned. Why might that be?
Because the text you are trying to convert is not Unicode (double
byte) text.

Try this:

?StrConv("M" & Chr(0) & "L" & Chr(0) & "H" & Chr(0), vbFromUnicode)

Mar 28 '07 #3
MLH
You are probably right. I cut 'n pasted the code from an old LyleFair
snippet. I wouldn't have used the function myself - I don't really
understand it. Here's the context in which the command is used...

Sub SendMailWithOE(ByVal strSubject As String, ByVal strMessage As
String, ByRef MyTargets As Variant)
Dim Recips() As MapiRecip
Dim Message As MAPIMessage
Dim z As Long
ReDim Recips(LBound(MyTargets) To UBound(MyTargets))
For z = LBound(MyTargets) To UBound(MyTargets)
With Recips(z)
.RecipClass = 1
If InStr(MyTargets(z), "@") <0 Then
.Address = StrConv(MyTargets(z), vbFromUnicode)
Else
.Name = StrConv(MyTargets(z), vbFromUnicode)
End If
End With
Next z
With Message
.NoteText = strMessage
.Subject = strSubject
.RecipCount = UBound(Recips) - LBound(MyTargets) + 1
.Recipients = VarPtr(Recips(LBound(Recips)))
End With
MAPISendMail 0, 0, Message, 0, 0
End Sub

In the IF statement... it always evaluates to true because Targets(i)
all have @-signs in them. MAPISendMail SEEMS TO NEED THE STRCONV.
IF MyTargets(0) IS "Ch*****@Angels.net" AND YOU DON'T USE STRCONV,
THE EMAIL ADDRESS USED IS C - just the first letter of the address. So
I'm forced to use the StrConv command. Dunno why.
On Wed, 28 Mar 2007 06:43:25 -0700, Tom van Stiphout
<no*************@cox.netwrote:
>On Wed, 28 Mar 2007 09:21:47 -0400, MLH <CR**@NorthState.netwrote:

Perhaps because it was late, and you meant to write:
?StrConv("So******@SomeDomain.net", vbUnicode)

Btw, your code also worked, but it yields unprintable characters. Just
use the Len and LenB functions on your line.

-Tom.

>>?StrConv("So******@SomeDomain.net", vbFromUnicode)
???????????

When I use StrConv in the manner shown above, a bunch
of question marks is all I ever see returned. Why might that be?
Of what real use is StrConv? Can you give me a useful case
example?
Mar 28 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Yu | last post by:
Hi, anybody knows how to use debug window to start console application program with input arguments. In DOS window I can start my application program likes MQGET QTT1 DAVID.LOCAL which input...
4
by: Thomas Anderson | last post by:
I would like to replicate the debug window on a form so I can easily pass usefull info to users on long processes. Is there a simple way to do this. thanks
3
by: Mike Turco | last post by:
Is there a way to clear the debug window other than just sending a bunch of line feeds? Tanks -- Mike
6
by: MLH | last post by:
I have this little snippet running whenever I want to list my table field names in the debug window, along with their field types... For i = 0 To TempRecordset.Fields.Count - 1 Debug.Print...
7
by: Thomas Pecha | last post by:
Sorry for all who think this is easy, I was not able to handle this Coming from VB6 where with simple debug.print strAString you could write to debug window, I am totalling failing in vb.net...
1
by: Adrian Constantinescu | last post by:
Hi, When a project VB.Net start, the output window if filled with this kind on informations: 'TextBox.exe': Loaded...
11
by: Yannick Turgeon | last post by:
Hello all, I'm using A97 and W2k. We have a little problem here. Sometimes (often?), users (all co-workers) are hitting <ctrl>-G by mistake and are stucked in the debug window. I would like...
2
by: Johann Schuler | last post by:
Let's say I have a Person class with a private int age member variable. I have a get and set accessor for the Age property. When I am running the code in debug mode, I would like to have a debug...
0
GaryTexmo
by: GaryTexmo | last post by:
Nothing amazing here, this is just a base groundwork for a debug window that someone could use to output debug text in a windows application. It provides fairly basic functionality so feel free to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.