Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default currentuser name

Hi,

I am writing a procedure to obtain the current users e-mail address. I am aware you can only get the exchange server address, which is fine, and I have found a solution that works in office 2000. However I need the procedure to work in 97 also and it returns an error saying the object doesn't support the property. The code is below. Any ideas of how to get this working under 97 would be greatly appreciated. Please note that as it needs to use 97 and 2000 I can't use the normal office object library and need to late bind it instead...


sub GetName()

Dim test As String, olApp As Object

Set olApp = CreateObject("Outlook.Application")
test = olApp.Session.CurrentUser.Name
MsgBox test

end sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"