![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Tags: current, firstname, outlook, script, user |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi all,
I'm looking for a way to get the Firstname of the currentUser, but I didn't find, if someone can help it will be great here the code I'm using nox, it give me The full Name of the user AddUsr = application.GetNameSpace("MAPI").CurrentUser tks -- http://bensoft.miniville.fr/ |
| Ads |
|
#2
|
|||
|
|||
|
Apply a little simple text parsing:
firstName = Left(AddUsr, Instr(AddUser, " ") -1) -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "bbnimda" wrote in message ... Hi all, I'm looking for a way to get the Firstname of the currentUser, but I didn't find, if someone can help it will be great here the code I'm using nox, it give me The full Name of the user AddUsr = application.GetNameSpace("MAPI").CurrentUser tks -- http://bensoft.miniville.fr/ |
|
#3
|
|||
|
|||
|
Hi Sue,
I allready tryed that, but some of them have composed Name and firstname and in this case I just obtain a part of the FirstName here's an example "Jean Michel De La Laurencie" where the First Name is "Jean Michel" and the Name " De La Laurencie" is there another way ? "Sue Mosher [MVP-Outlook]" a écrit dans le message de news: ... Apply a little simple text parsing: firstName = Left(AddUsr, Instr(AddUser, " ") -1) -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "bbnimda" wrote in message ... Hi all, I'm looking for a way to get the Firstname of the currentUser, but I didn't find, if someone can help it will be great here the code I'm using nox, it give me The full Name of the user AddUsr = application.GetNameSpace("MAPI").CurrentUser tks -- http://bensoft.miniville.fr/ |
|
#4
|
|||
|
|||
|
Not enough information to say. We don't know your OUtlook version or whether users have Exchange mailboxes or POP3 accounts.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "bbnimda" wrote in message ... Hi Sue, I allready tryed that, but some of them have composed Name and firstname and in this case I just obtain a part of the FirstName here's an example "Jean Michel De La Laurencie" where the First Name is "Jean Michel" and the Name " De La Laurencie" is there another way ? "Sue Mosher [MVP-Outlook]" a écrit dans le message de news: ... Apply a little simple text parsing: firstName = Left(AddUsr, Instr(AddUser, " ") -1) "bbnimda" wrote in message ... Hi all, I'm looking for a way to get the Firstname of the currentUser, but I didn't find, if someone can help it will be great here the code I'm using nox, it give me The full Name of the user AddUsr = application.GetNameSpace("MAPI").CurrentUser tks -- http://bensoft.miniville.fr/ |
|
#6
|
|||
|
|||
|
In that case, what you want to do cannot be done with the Outlook object model. You'd need to use a low-level API such as CDO 1.21 or, to avoid security prompts, Redemption, to get the AddressEntry object representing the current user and access the PR_GIVEN_NAME (&H3A06001E) MAPI property through the Fields collection. The page at http://www.cdolive.com/cdo10.htm is a good primer on working with MAPI properties.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "bbnimda" wrote in message ... I'm using outlook 2003 / Exchange 2003 "Sue Mosher [MVP-Outlook]" a écrit dans le message de news: ... Not enough information to say. We don't know your OUtlook version or whether users have Exchange mailboxes or POP3 accounts. "bbnimda" wrote in message ... Hi Sue, I allready tryed that, but some of them have composed Name and firstname and in this case I just obtain a part of the FirstName here's an example "Jean Michel De La Laurencie" where the First Name is "Jean Michel" and the Name " De La Laurencie" is there another way ? "Sue Mosher [MVP-Outlook]" a écrit dans le message de news: ... Apply a little simple text parsing: firstName = Left(AddUsr, Instr(AddUser, " ") -1) "bbnimda" wrote in message ... Hi all, I'm looking for a way to get the Firstname of the currentUser, but I didn't find, if someone can help it will be great here the code I'm using nox, it give me The full Name of the user AddUsr = application.GetNameSpace("MAPI").CurrentUser |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outlook Script : How to get the current Folder | bbnimda | Outlook and VBA | 3 | November 21st 07 04:23 PM |
| Get the Name and Phone Number of the Current Windows User from Outlook 2003 | Alex | Outlook - General Queries | 2 | July 11th 07 06:17 PM |
| Address Book / Contacts - some entries listed in Firstname Surname, others in Surname, Firstname order | Martin Underwood | Outlook - General Queries | 1 | November 29th 06 03:19 PM |
| Outlook is not installed for current user | Ian Hobday | Outlook - Installation | 1 | November 13th 06 06:56 PM |
| 'Run a script' to open Current Calendar item | henry | Outlook - Using Forms | 1 | July 19th 06 11:29 PM |