Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > I need help finding email client name

I need help finding email client name

Forum Windows XP : Windows XP General Discussion - I need help finding email client name

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.general (More info?)

 

Does anyone know how to obtain the name of the current
user's e-mail client from VBA code? E.g., "Outlook",
"Outlook Express", etc.

Thanks,
Bill

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windowsxp.general (More info?)

 

Bill wrote:

> Does anyone know how to obtain the name of the current
> user's e-mail client from VBA code? E.g., "Outlook",
> "Outlook Express", etc.
Hi,

Read the default value under the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/s [...] fault.mspx

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.general (More info?)

 

Thanks! Do you know how to read a Registry value
from VBA code? That's the task I have.
Thanks again,
Bill


"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:%23RwlJszfFHA.2372@TK2MSFTNGP14.phx.gbl...
> Bill wrote:
>
>> Does anyone know how to obtain the name of the current
>> user's e-mail client from VBA code? E.g., "Outlook",
>> "Outlook Express", etc.
> Hi,
>
> Read the default value under the registry key
> HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/s [...] fault.mspx

Reply to bill

Archived from groups: microsoft.public.windowsxp.general (More info?)

 

Bill wrote:

> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote:
>> Bill wrote:
>>
>>> Does anyone know how to obtain the name of the current
>>> user's e-mail client from VBA code? E.g., "Outlook",
>>> "Outlook Express", etc.
>>
>>
>> Read the default value under the registry key
>> HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail
>
> Thanks! Do you know how to read a Registry value
> from VBA code? That's the task I have.
> Thanks again,
> Bill
Hi,

Use the RegRead method of the WshShell object in the Windows Script
Host (WSH) Object Model:

'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell" )
sDefaultMail = oShell.RegRead("HKLM\SOFTWARE\Clients\Mail\" )
MsgBox sDefaultMail
'--------------------8<----------------------


WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/s [...] fault.mspx

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.general (More info?)

 

Thanks Torgeir, I'm sure there's a VBA couter-part to the Script
code you sent. If not, I have the Script Host and will use the code
you sent.
Thanks again,
Bill



"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:%23mRIJI1fFHA.3256@TK2MSFTNGP12.phx.gbl...
> Bill wrote:
>
>> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote:
>>> Bill wrote:
>>>
>>>> Does anyone know how to obtain the name of the current
>>>> user's e-mail client from VBA code? E.g., "Outlook",
>>>> "Outlook Express", etc.
>>>
>>>
>>> Read the default value under the registry key
>>> HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail
>>
>> Thanks! Do you know how to read a Registry value
>> from VBA code? That's the task I have.
>> Thanks again,
>> Bill
> Hi,
>
> Use the RegRead method of the WshShell object in the Windows Script
> Host (WSH) Object Model:
>
> '--------------------8<----------------------
> Set oShell = CreateObject("WScript.Shell" )
> sDefaultMail = oShell.RegRead("HKLM\SOFTWARE\Clients\Mail\" )
> MsgBox sDefaultMail
> '--------------------8<----------------------
>
>
> WSH 5.6 documentation (local help file) can be downloaded from here
> if you haven't got it already:
> http://msdn.microsoft.com/downloads/list/webdev.asp
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/s [...] fault.mspx

Reply to bill

Archived from groups: microsoft.public.windowsxp.general (More info?)

 

Bill wrote:

> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote:
>> Bill wrote:
>>>
>>> Thanks! Do you know how to read a Registry value
>>> from VBA code? That's the task I have.
>>
>> Use the RegRead method of the WshShell object in the Windows
>> Script Host (WSH) Object Model:
>>
>> '--------------------8<----------------------
>> Set oShell = CreateObject("WScript.Shell" )
>> sDefaultMail = oShell.RegRead("HKLM\SOFTWARE\Clients\Mail\" )
>> MsgBox sDefaultMail
>> '--------------------8<----------------------
>>
>
> Thanks Torgeir, I'm sure there's a VBA couter-part to the Script
> code code you sent. If not, I have the Script Host and will use
> the you sent.
Hi,

The code I posted ran successfully in a Excel macro I created...


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/s [...] fault.mspx

Reply to Anonymous

Archived from groups: microsoft.public.windowsxp.general (More info?)

 

Torgeir, from your macro example, I created a
simple function:
====================================
Public Function GetDfltEmailClient() As String
Dim objShell As Object

Set objShell = CreateObject("WScript.Shell" )
GetDfltEmailClient = objShell.RegRead("HKLM\SOFTWARE\Clients\Mail\" )
End Function
====================================
I've posted elsewhere a question relating to the down-side
of coding with a dependency on the Script Host, as I can't
guarantee exactly where the code might run. It's not likely
that anything older than a 98SE with Office2000 system
would be encountered, but I'd like the experience of other
major Access users.

Thanks again for your thoughts and suggestions.

Bill



"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:%23B2duH%23fFHA.1148@TK2MSFTNGP12.phx.gbl...
> Bill wrote:
>
>> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote:
>>> Bill wrote:
>>>>
>>>> Thanks! Do you know how to read a Registry value
>>>> from VBA code? That's the task I have.
>>>
>>> Use the RegRead method of the WshShell object in the Windows
>>> Script Host (WSH) Object Model:
>>>
>>> '--------------------8<----------------------
>>> Set oShell = CreateObject("WScript.Shell" )
>>> sDefaultMail = oShell.RegRead("HKLM\SOFTWARE\Clients\Mail\" )
>>> MsgBox sDefaultMail
>>> '--------------------8<----------------------
>>>
>>
>> Thanks Torgeir, I'm sure there's a VBA couter-part to the Script
>> code code you sent. If not, I have the Script Host and will use
>> the you sent.
> Hi,
>
> The code I posted ran successfully in a Excel macro I created...
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/s [...] fault.mspx

Reply to bill

Archived from groups: microsoft.public.windowsxp.general (More info?)

 

Bill wrote:

> Torgeir, from your macro example, I created a
> simple function:
> ====================================
> Public Function GetDfltEmailClient() As String
> Dim objShell As Object
>
> Set objShell = CreateObject("WScript.Shell" )
> GetDfltEmailClient = objShell.RegRead("HKLM\SOFTWARE\Clients\Mail\" )
> End Function
> ====================================
> I've posted elsewhere a question relating to the down-side
> of coding with a dependency on the Script Host, as I can't
> guarantee exactly where the code might run. It's not likely
> that anything older than a 98SE with Office2000 system
> would be encountered, but I'd like the experience of other
> major Access users.
>
> Thanks again for your thoughts and suggestions.
Hi,

For 98SE and newer, the code should work fine.

For older than 98SE, as long as Internet Explorer 5.01 or newer
is installed, it will also work fine.


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/s [...] fault.mspx

Reply to Anonymous
Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > I need help finding email client name
Go to:

There are 1042 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them