A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , , , ,

Outlook Script: How to get the FirstName of the current User





 
 
Thread Tools Display Modes
  #1  
Old November 27th 07, 10:09 AM posted to microsoft.public.outlook.program_forms
bbnimda
external usenet poster
 
Posts: 90
Default Outlook Script: How to get the FirstName of the current User

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  
Old November 27th 07, 02:32 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook Script: How to get the FirstName of the current User

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  
Old November 27th 07, 03:12 PM posted to microsoft.public.outlook.program_forms
bbnimda
external usenet poster
 
Posts: 90
Default Outlook Script: How to get the FirstName of the current User

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  
Old November 27th 07, 06:39 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook Script: How to get the FirstName of the current User

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/




  #5  
Old November 28th 07, 10:31 AM posted to microsoft.public.outlook.program_forms
bbnimda
external usenet poster
 
Posts: 90
Default Outlook Script: How to get the FirstName of the current User

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.

--
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  
Old November 28th 07, 04:41 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook Script: How to get the FirstName of the current User

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 10:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Myspace Codes - Pacotes Carnaval Salvador - Shares - Best Credit Cards - Internet Advertising