Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default EXCEL Macro calling on Outlook

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default EXCEL Macro calling on Outlook

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default EXCEL Macro calling on Outlook

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default EXCEL Macro calling on Outlook

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

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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default EXCEL Macro calling on Outlook

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

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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default EXCEL Macro calling on Outlook

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

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








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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling .net Component from Excel Macro j_koushik Excel Discussion (Misc queries) 0 September 30th 05 06:26 AM
Calling Outlook Macro sgreville Excel Programming 0 October 25th 04 12:03 PM
calling excel macro TommyBoy Excel Programming 0 August 12th 04 10:25 PM
Calling Excel Macro From Vc++ via DDE hari Excel Programming 0 July 6th 04 12:50 PM
calling a dll from excel macro Stefan[_4_] Excel Programming 1 December 12th 03 12:16 AM


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

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

About Us

"It's about Microsoft Excel"