Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In order to sign a form, I am going to Outlook to find the name of the person
who has logged onto the computer. Set objOutlook = CreateObject("Outlook.Application") Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser However, when the code is executed, the Outlook application starts to flash orange and when clicked, the message about Outlook trying to send email appears. This is a problem because most people don't know what the orange flashing button means. Is there any other way to get the name of the logged on person? -- Gloriann O'Brien |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel can tell you
Environ("UserName") -- HTH RP (remove nothere from the email address if mailing direct) "gobjob" wrote in message ... In order to sign a form, I am going to Outlook to find the name of the person who has logged onto the computer. Set objOutlook = CreateObject("Outlook.Application") Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser However, when the code is executed, the Outlook application starts to flash orange and when clicked, the message about Outlook trying to send email appears. This is a problem because most people don't know what the orange flashing button means. Is there any other way to get the name of the logged on person? -- Gloriann O'Brien |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Our Outlook must be configured different. This works but I don't get the
same username I get with Outlook GetNameSpace. My UserName in Outlook is O'Brien, Gloriann but I log onto my computer with a UID. Eg. UID iq4qw08. This is the name that shows up in the Excel cell. Do you have any idea what is going on? Can't find my UID in the set up. -- Gloriann O'Brien "Bob Phillips" wrote: Excel can tell you Environ("UserName") -- HTH RP (remove nothere from the email address if mailing direct) "gobjob" wrote in message ... In order to sign a form, I am going to Outlook to find the name of the person who has logged onto the computer. Set objOutlook = CreateObject("Outlook.Application") Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser However, when the code is executed, the Outlook application starts to flash orange and when clicked, the message about Outlook trying to send email appears. This is a problem because most people don't know what the orange flashing button means. Is there any other way to get the name of the logged on person? -- Gloriann O'Brien |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You said the name of the logged on user, what Outlook is returning is the
Outlook profile - different things. I couldn't reproduce the problem, but I wonder if it because Outlook is already started. Try this On Error Resume Next Set objOutlook = GetObject(, "Outlook.Application") On Error GoTo 0 If objOutlook Is Nothing Then Set objOutlook = CreateObject("Outlook.Application") Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser MsgBox NameSpace.Name Set objOutlook = Nothing Else Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser MsgBox NameSpace.Name End If -- HTH RP (remove nothere from the email address if mailing direct) "gobjob" wrote in message ... Our Outlook must be configured different. This works but I don't get the same username I get with Outlook GetNameSpace. My UserName in Outlook is O'Brien, Gloriann but I log onto my computer with a UID. Eg. UID iq4qw08. This is the name that shows up in the Excel cell. Do you have any idea what is going on? Can't find my UID in the set up. -- Gloriann O'Brien "Bob Phillips" wrote: Excel can tell you Environ("UserName") -- HTH RP (remove nothere from the email address if mailing direct) "gobjob" wrote in message ... In order to sign a form, I am going to Outlook to find the name of the person who has logged onto the computer. Set objOutlook = CreateObject("Outlook.Application") Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser However, when the code is executed, the Outlook application starts to flash orange and when clicked, the message about Outlook trying to send appears. This is a problem because most people don't know what the orange flashing button means. Is there any other way to get the name of the logged on person? -- Gloriann O'Brien |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It does pull up my name but I still get that message that Outlook is trying
to access email. The problem is that it does put me back in the Excel screen. It moves me over to Outlook and Excel button is flashing orange. My people know what to do with the accessing email. It's the redirecting that is causing trouble. Any ideas how to keep excel up front? -- Gloriann O'Brien "Bob Phillips" wrote: You said the name of the logged on user, what Outlook is returning is the Outlook profile - different things. I couldn't reproduce the problem, but I wonder if it because Outlook is already started. Try this On Error Resume Next Set objOutlook = GetObject(, "Outlook.Application") On Error GoTo 0 If objOutlook Is Nothing Then Set objOutlook = CreateObject("Outlook.Application") Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser MsgBox NameSpace.Name Set objOutlook = Nothing Else Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser MsgBox NameSpace.Name End If -- HTH RP (remove nothere from the email address if mailing direct) "gobjob" wrote in message ... Our Outlook must be configured different. This works but I don't get the same username I get with Outlook GetNameSpace. My UserName in Outlook is O'Brien, Gloriann but I log onto my computer with a UID. Eg. UID iq4qw08. This is the name that shows up in the Excel cell. Do you have any idea what is going on? Can't find my UID in the set up. -- Gloriann O'Brien "Bob Phillips" wrote: Excel can tell you Environ("UserName") -- HTH RP (remove nothere from the email address if mailing direct) "gobjob" wrote in message ... In order to sign a form, I am going to Outlook to find the name of the person who has logged onto the computer. Set objOutlook = CreateObject("Outlook.Application") Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser However, when the code is executed, the Outlook application starts to flash orange and when clicked, the message about Outlook trying to send appears. This is a problem because most people don't know what the orange flashing button means. Is there any other way to get the name of the logged on person? -- Gloriann O'Brien |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You might try http://www.rondebruin.nl/mail/prevent.htm
-- HTH RP (remove nothere from the email address if mailing direct) "gobjob" wrote in message ... It does pull up my name but I still get that message that Outlook is trying to access email. The problem is that it does put me back in the Excel screen. It moves me over to Outlook and Excel button is flashing orange. My people know what to do with the accessing email. It's the redirecting that is causing trouble. Any ideas how to keep excel up front? -- Gloriann O'Brien "Bob Phillips" wrote: You said the name of the logged on user, what Outlook is returning is the Outlook profile - different things. I couldn't reproduce the problem, but I wonder if it because Outlook is already started. Try this On Error Resume Next Set objOutlook = GetObject(, "Outlook.Application") On Error GoTo 0 If objOutlook Is Nothing Then Set objOutlook = CreateObject("Outlook.Application") Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser MsgBox NameSpace.Name Set objOutlook = Nothing Else Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser MsgBox NameSpace.Name End If -- HTH RP (remove nothere from the email address if mailing direct) "gobjob" wrote in message ... Our Outlook must be configured different. This works but I don't get the same username I get with Outlook GetNameSpace. My UserName in Outlook is O'Brien, Gloriann but I log onto my computer with a UID. Eg. UID iq4qw08. This is the name that shows up in the Excel cell. Do you have any idea what is going on? Can't find my UID in the set up. -- Gloriann O'Brien "Bob Phillips" wrote: Excel can tell you Environ("UserName") -- HTH RP (remove nothere from the email address if mailing direct) "gobjob" wrote in message ... In order to sign a form, I am going to Outlook to find the name of the person who has logged onto the computer. Set objOutlook = CreateObject("Outlook.Application") Set NameSpace = objOutlook.GetNameSpace("MAPI").CurrentUser However, when the code is executed, the Outlook application starts to flash orange and when clicked, the message about Outlook trying to send appears. This is a problem because most people don't know what the orange flashing button means. Is there any other way to get the name of the logged on person? -- Gloriann O'Brien |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calling .net Component from Excel Macro | Excel Discussion (Misc queries) | |||
Calling Outlook Macro | Excel Programming | |||
calling excel macro | Excel Programming | |||
Calling Excel Macro From Vc++ via DDE | Excel Programming | |||
calling a dll from excel macro | Excel Programming |