Sign in to follow this  
Followers 0
mary

Outlook 2003 get mail adress of current profile

14 posts in this topic

Hi!

I have outlook 2003 and a ready configured exchange profile.

My question: How to get the mailadresse of the current configured profile ?

the is an outlook UDF but there is nothing about (account info).

maybe it is more simple with registry but what key store the mailadress of the current profile ?

Thanks a lot

Share this post


Link to post
Share on other sites



Did you check the Outlook UDF written by wooltown or the OutlookEX UDF I created?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

yes but did not find function to get a property like "mail_adress" of the current configured account

Edited by mary

Share this post


Link to post
Share on other sites

This code displays the name of the current user which then can be resolved by the UDF to a valid recipient:

#include <OutlookEX.au3>

Global $oOutlook = _OL_Open()
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended)

Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name
MsgBox(0, "Name", $sCurrentUser)

_OL_Close($oOutlook)
If you need the real address (gn.name@company.com) I need to know which kind of user we are talking about (Exchange user ...)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

it is Exchange user

Share this post


Link to post
Share on other sites

Then this code should return the PrimarySMTPAddress

#include <OutlookEX.au3>

Global $oOutlook = _OL_Open()
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended)

Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.AddressEntry.GetExchangeUser.PrimarySmtpAddress
MsgBox(0, "Name", $sCurrentUser)

_OL_Close($oOutlook)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks, i get the username but i have error

Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.AddressEntry.GetExchangeUser.PrimarySmtpAddress

Share this post


Link to post
Share on other sites

Can you please post the error messages you get?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

COM Error Encountered in lolo.au3
OutlookEx UDF version = 0.9.0
@AutoItVersion = 3.3.6.1
@AutoItX64 = 0
@Compiled = 0
@OSArch = X86
@OSVersion = WIN_XP
Scriptline = 18
NumberHex = 80020006
Number = -2147352570
WinDescription = Nom inconnu.
Description =
Source =
HelpFile =
HelpContext =
LastDllError = 0

Share this post


Link to post
Share on other sites

I did some research on MSDN.

Looks like the GetExchangeUser method isn't available with Outlook 2003. So you can get the name but not the smtp address.

What do you need it for?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

just to get the mail_address and associate it with the local IP (I have a LAN with 153 PC).

im my server, i will make a csv file like this:

mail;IP

Edited by mary

Share this post


Link to post
Share on other sites

If you need the mail_address to send a mail then the name is sufficient. Outlook resolves it and then can deliver the mail. So no need for the SMTP mail address.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

ah, ok !! thanks a lot

Share this post


Link to post
Share on other sites
:D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0

  • Similar Content

    • Skysnake
      By Skysnake
      Scite comes up occasional, almost incidentally, in some support topics.  I have not found a "Scite" topic in the forums, so this is where I will start.  I have recently been using Scite intensively, specifically with a large project and I have certain issues.  I know that Scite is not an AutoIt product, but it is so closely integrated to the core release that it makes sense to raise issues and request support here.  If this is not the right please refer me to the right forum.
      Thx
       
      Skysnake
    • JohnOne
      By JohnOne
      Feel free to post your windows 10 how to questions in here if you like.
      How to secure Windows 10: The paranoid's guide (external - zdnet)
      How to disable web search (within the windows search feature).
      How to determine which exact process under Service Host dropdown in task manager, is using the displayed overall network resources? (not a windows 10 feature)
    • Loken
      By Loken
      Hi Autoit Forum ,
      I want to learn how to click a submit  who have to know class and value.
      <input class="classb" type="submit" name="R_YTRD" value="Sign In"/>  
      Thanks ..