Jump to content

How to get own default e-mail address ?


Exit
 Share

Recommended Posts

I ran the code from post #1 and got:

Your e-mail program is >Microsoft Outlook>

Your e-mail address is >not found<

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I ran the code from post #1 and got:

Your e-mail program is >Microsoft Outlook>

Your e-mail address is >not found<

I have no domain test environment and cannot solve this issue. :(

If I would have a regedit export dataset of key

"HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"

i could dig deeper. But you cannot send this data since there are passwords in it. :(

This one may be relatively popular as well: http://www.emclient.com/

I'll have a look on it. :)

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

If it helps i can send you screenshots of the relevant parts by PM.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

If it helps i can send you screenshots of the relevant parts by PM.

Why don't you just export the profile key from regedit and delete anything that you don't want EXIT to see?

Depending on how many accounts you have it wouldn't be hard.

EXIT could import test and delete later. :)

Link to comment
Share on other sites

Because I don't know which data to delete. As it is all binary it is quite hard to read.

But maybe Exit can shed some light on the subject.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Because I don't know which data to delete. As it is all binary it is quite hard to read.

But maybe Exit can shed some light on the subject.

Yeah maybe except I did all the original research on this method... :graduated:

Was playing with code for most of day to get the original script to work.

Exit improoved on it and made it more generic. :)

The main keys you don't want to share are any keys with PASSWORD in the name.

and if you want to look at the keys contents just double click on them in regedit. It will show you the HEX and CHAR represations of the binary data.

Anyway back to paper work. :(

Link to comment
Share on other sites

The main keys you don't want to share are any keys with PASSWORD in the name.

Didn't find any keys wiht PASSWORD in the name. Does this mean I can export and share the registry keys?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Hi Water

Looking through my keys, password is the only one that contains sensative information.

To be sure just use "regedit" and step through the keys. As you open each one you'll be able to see the contents as text and be able to make sure that their isn't something on yours that is different from the norm. I doubt their will be. :)

Link to comment
Share on other sites

  • 5 months later...

G'day Exit

It's been a while but I just revisited this code in one of my programs and wondered if you'd done any more work on it?

Hope everyone is having a great weekend!

John Morrison

Link to comment
Share on other sites

It's been a while but I just revisited this code in one of my programs and wondered if you'd done any more work on it?

I got no feedback from domain users and no feedback about other mail clients.

The code in post #1 is my valid code. If it will change, I will notify here.

Edited by Exit

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

I got no feedback from domain users and no feedback about other mail clients.

The code in post #1 is my valid code. If it will change, I will notify here.

I thought water was working with you on the domain side.

I've been getting a few "not found" messages just lately and was hoping you'd found them to but hadn't updated this post. So I'll add the diagnostic text box for email client again and let you know which ones have changed.

If you let me know what you need to know I maybe able to add a "log" function to send it to you.

On ward and upward. :)

John Morrison

Link to comment
Share on other sites

I re-read the thread but at the moment I'm not sure what is missing or what I could test.

Can we post what needs to be done? I will then try to deliver the domain and/or Outlook part.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 4 weeks later...

OK,

So I got the function and it works great. Thanks!

I looked everywhere for a description of SMPTA to no avail.

I would imagine there is a value that would give me the user's full name instead of the e-mail address.

$sAccount = $oAccount.SMTPAddress

Does anybody know where I can get info on how to get information other than the e-mail address, namely the full name?

This can be very useful to include the user's name in reports sent to administrators, and many other company wide applications.

Thank you.

Link to comment
Share on other sites

Either

$sName = $oAccount.DisplayName
or
$sName = $oAccount.UserName
should return what you need.

Details can be found here.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I tried both recommendations:

$oAccount= $oAccount.UserName

Gives me "FirstInitialLastName" all one word.

$oAccount= $oAccount.DisplayName

gives me the same e-mail address as

$sAccount = $oAccount.SMTPAddress

I tried all the Account Object Members listed in your link to no avail. I use Office 2010, so I looked for the same topic for 2010 and could not get my first and last name.

In Visual Basic for Apps I get it using this:

Sub MyName()

MsgBox CreateObject("Outlook.application").Getnamespace("MAPI").CurrentUser

End Sub

Edited by JailDoctor
Link to comment
Share on other sites

I will try as soon as I get to my Outlook account

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Needs to be

MsgBox (0, "", $oOutlook.Getnamespace("MAPI").CurrentUser.Name)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Still not working.

Here is my code:

;;~ Get full name
Dim $WhoAmI = _Get_Microsoft_Outlook_Account()
MsgBox(0,"",$WhoAmI)


Func _Get_Microsoft_Outlook_Account()
Local $bCreated = False
Global $sAccount = "not found"
Local $oClient = ObjGet("", "Outlook.Application") ; Try to connect to a running instance
If @error Then
$oClient = ObjCreate("Outlook.Application") ; No instance was running, start Outlook
$bCreated = True
EndIf
If Not @error Then
For $oAccount In $oClient.Session.Accounts
$sAccount = $oAccount.Getnamespace("MAPI").CurrentUser.Name

ExitLoop
Next
EndIf
If $bCreated Then ; If Outlook has been started by this function, logoff and close Outlook
$oClient.Session.Logoff
$oClient.Application.Quit
$oClient.Quit
$oClient = 0
EndIf
Return $sAccount
EndFunc ;==>_Get_Microsoft_Outlook_Account

Error message:

==> The requested action with this object has failed.:

$sAccount = $oAccount.Getnamespace("MAPI").CurrentUser.Name

$sAccount = $oAccount.Getnamespace("MAPI")^ ERROR

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...