473,624 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does ?StrConv("SomeA ddr@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 3784
On Wed, 28 Mar 2007 09:21:47 -0400, MLH <CR**@NorthStat e.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...@NorthStat e.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(M yTargets) To UBound(MyTarget s))
For z = LBound(MyTarget s) To UBound(MyTarget s)
With Recips(z)
.RecipClass = 1
If InStr(MyTargets (z), "@") <0 Then
.Address = StrConv(MyTarge ts(z), vbFromUnicode)
Else
.Name = StrConv(MyTarge ts(z), vbFromUnicode)
End If
End With
Next z
With Message
.NoteText = strMessage
.Subject = strSubject
.RecipCount = UBound(Recips) - LBound(MyTarget s) + 1
.Recipients = VarPtr(Recips(L Bound(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**@NorthStat e.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* *****@SomeDomai n.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
4902
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 Queue Manager and local queue. But If I want to run in debug mode how do I enter that two
4
4470
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
8151
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
3386
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 TempRecordset.Fields(i).Name; " "; Debug.Print ", "; TempRecordset.Fields(i).Type Next i I don't understand the numbers returned for field type. Take a look at the following sample output...
7
18784
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 2003 The sample in the help file does not work. I tried now for days ... Pls could anybody post a sample, including necessary imports and so on -
1
1867
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 'c:\windows\assembly\gac\system.windows.forms\1.0.3300.0__b77a5c561934e089\system.windows.forms.dll', No symbols loaded. 'TextBox.exe': Loaded 'c:\windows\assembly\gac\system\1.0.3300.0__b77a5c561934e089\system.dll', No symbols loaded.
11
3641
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 to change the keys (<shift><ctrl>-G or something like that) that open this window. And I really want to be able to open it when I (the programmer) want it.
2
2560
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 window show me the value of age (rather than the value of the Age property). Is there a way to do this? Thanks!
0
4504
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 modify to suit your purposes. The topic came up in a question thread (somewhat) and mostly it reminded me that I had been meaning to make one of these so figured I'd share it. It's important to note that there are other methods of gathering debug...
0
8175
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8680
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6111
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2610
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.