I'm using the following code to retrieve a list of all the Categories
used by Microsoft Outlook:
sub test()
Dim objWSHShell As Object
Dim strCategoryList As Variant
Set objWSHShell = CreateObject("WScript.Shell")
strCategoryList = objWSHShell.RegRead_
("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0 \Outlook\Categories\MasterList")
end sub
Upon viewing strCategoryList, I can see that I have unicode characters.
What I'd like to do is convert this unicode string to a normal string
that works with VB functions.
How can I do that?
By the way, I tried to declare strCategoryList as a String variable,
but received a type mismatch when it attempted to copy the values.
Any help would be appreciated. I'm a Unicode Newbie!
Terry 8 3845
Ooops! I suppose I should have said that I'm using Access 2003 and
Outlook 2003.
Thanks,
Terry
Alphaboomer wrote: I'm using the following code to retrieve a list of all the Categories used by Microsoft Outlook:
sub test() Dim objWSHShell As Object Dim strCategoryList As Variant
Set objWSHShell = CreateObject("WScript.Shell") strCategoryList = objWSHShell.RegRead_
("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0 \Outlook\Categories\MasterList") end sub
Upon viewing strCategoryList, I can see that I have unicode
characters. What I'd like to do is convert this unicode string to a normal string that works with VB functions.
How can I do that?
If your problem is really converting from Unicode, the StrConv function
using the vbFromUnicode constant should work. Also, I feel comfortable
using the Outlook Object Model so perhaps check to see if Categories
are part of the Object Model.
James A. Fortune
A form's complexity seldom grows linearly with the number of controls
on it.
James,
Thanks for your reply. Unfortunately, any time I try to use a string
conversion function, I get a type mismatch error (13).
According to some other Outlook forums, the only location that stores
the Master Category list is the registry.
Any other ideas would be appreciated!
Terry
James,
Thanks for your reply. Unfortunately, any time I try to use a string
conversion function, I get a type mismatch error (13).
According to some other Outlook forums, the only location that stores
the Master Category list is the registry.
Any other ideas would be appreciated!
Terry
On 9 Dec 2004 14:24:30 -0800, "Alphaboomer" <al*********@hotmail.com>
wrote: I'm using the following code to retrieve a list of all the Categories used by Microsoft Outlook:
sub test() Dim objWSHShell As Object Dim strCategoryList As Variant
Set objWSHShell = CreateObject("WScript.Shell") strCategoryList = objWSHShell.RegRead_ ("HKEY_CURRENT_USER\Software\Microsoft\Office\11. 0\Outlook\Categories\MasterList")
end sub
Upon viewing strCategoryList, I can see that I have unicode characters. What I'd like to do is convert this unicode string to a normal string that works with VB functions.
How can I do that?
By the way, I tried to declare strCategoryList as a String variable, but received a type mismatch when it attempted to copy the values. Any help would be appreciated. I'm a Unicode Newbie!
Terry
Hi
This surely should work without any conversion, as VB works in unicode
internally. Your code worked for me (admittedly with a different
registry string) both in vb6 and in Access 97 with strCategoryList
declared as a string.
David
On 9 Dec 2004 14:24:30 -0800, "Alphaboomer" <al*********@hotmail.com>
wrote: I'm using the following code to retrieve a list of all the Categories used by Microsoft Outlook:
sub test() Dim objWSHShell As Object Dim strCategoryList As Variant
Set objWSHShell = CreateObject("WScript.Shell") strCategoryList = objWSHShell.RegRead_ ("HKEY_CURRENT_USER\Software\Microsoft\Office\11. 0\Outlook\Categories\MasterList")
end sub
Upon viewing strCategoryList, I can see that I have unicode characters. What I'd like to do is convert this unicode string to a normal string that works with VB functions.
How can I do that?
By the way, I tried to declare strCategoryList as a String variable, but received a type mismatch when it attempted to copy the values. Any help would be appreciated. I'm a Unicode Newbie!
Terry
Hi
This surely should work without any conversion, as VB works in unicode
internally. Your code worked for me (admittedly with a different
registry string) both in vb6 and in Access 97 with strCategoryList
declared as a string.
David
Thanks to all - the problem is solved.
Apparently the registry entry is stored in a binary format, not
Unicode.
Sorry for the annoyance!
Terry
Thanks to all - the problem is solved.
Apparently the registry entry is stored in a binary format, not
Unicode.
Sorry for the annoyance!
Terry This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ..... |
last post by:
I have an established program that I am changing to allow users to select
one of eight languages and have all the label captions change accordingly.
I have no problems with English, French, Dutch,...
|
by: aurora |
last post by:
I have long find the Python default encoding of strict ASCII frustrating.
For one thing I prefer to get garbage character than an exception. But the
biggest issue is Unicode exception often pop up...
|
by: Maxim Kasimov |
last post by:
there are a few questions i can find answer in manual:
1. how to define which is internal encoding of python unicode strings (UTF-8, UTF-16 ...)
2. how to convert string to UCS-2
(Python 2.2.3...
|
by: Keith MacDonald |
last post by:
Hello,
Is there a portable (at least for VC.Net and g++) method to convert text
between
wchar_t and char, using the standard library? I may have missed something
obvious, but the section on...
|
by: Gidi |
last post by:
Hi,
I'm writing a C# win application program, and i need to transfer my hebrew
letters from unicode to ascii, now if i use the ascii encoding it writes me
??? instead of the hebrew letter i've...
|
by: Hugo Amselschlag |
last post by:
Hi there,
I've implemented a local system hook to suppress certain windows beeing
displayed by the axWebbrowser control. Now I need some more information
before I can decide, whether to suppress...
|
by: John Salerno |
last post by:
Forgive my newbieness, but I don't quite understand why Unicode is still
something that needs special treatment in Python (and perhaps
elsewhere). I'm reading Dive Into Python right now, and it...
|
by: apprentice |
last post by:
Hello,
I'm writing an class library that I imagine people from different countries
might be interested in using, so I'm considering what needs to be provided
to support foreign languages,...
|
by: Donn Ingle |
last post by:
Hello,
I hope someone can illuminate this situation for me.
Here's the nutshell:
1. On start I call locale.setlocale(locale.LC_ALL,''), the getlocale.
2. If this returns "C" or anything...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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,...
| |