LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Opening New Email On top of Excel / SetForegroundWindow

I am certainly no programer. I simply use VB to make my life easier in my
Job.
I use the below code to Open a new email from within Excel and get the
address from the spreadsheet and send it out to the customer. It all works
fine accept that now that I have switched from Windows NT and office 97 to
windows 2000 and office 2000. Now when I run this code instead of the email
opening up it just blinks at the bottom in my task bar telling me its there
for me to click on.

I have found some good explanations on why this takes place in Office 2000
and even some code to solve the problems on the net & on in the news groups.
Unfortunetely I can't seem to figure out how to use it. There is a great
explanation at www.vbpj.com Feb 1999 "Is SetForegroundWindow Broken"
http://www.ftponline.com/Archives/pr...b99/ap0299.pdf

And even some great looking code. Unfortunetely its way over my head, I cant
figure out how to use it and indeed might be more than I need.

Can anyone provide me with the code that would simply open a new email on
top of my current running app which is XL and then when I send it simply
revert back to XL like it use to be in Office 97. I'm hopefull that if
someone can provide this I can do the rest and tweak it for my situation.

Thank you
Stacy
(7willie)

Dim objOL As Outlook.Application
Dim msg As Outlook.MailItem

Set objOL = New Outlook.Application
Set msg = objOL.CreateItem(olMailItem)

With msg
.To = CustEmailAddr
.Subject = "Your info: " & Time()
.Body = "Here is the file you were looking for"
.Attachments.Add AttachFile
'.Send
.Display
End With


 
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
OPENING EXCEL EMAIL ATTACHMENTS colin 007 Excel Discussion (Misc queries) 2 April 21st 09 07:42 PM
Excel crashes when opening word or new email ckotas Excel Discussion (Misc queries) 4 October 22nd 07 02:46 AM
SUM function opening new email Sarah_Lecturer Excel Discussion (Misc queries) 4 April 26th 06 12:04 PM
Problem opening excel files from email DXC001 Excel Discussion (Misc queries) 1 October 3rd 05 07:56 PM
opening from email c Excel Discussion (Misc queries) 1 March 16th 05 05:08 PM


All times are GMT +1. The time now is 07:26 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"