View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Madan Madan is offline
external usenet poster
 
Posts: 3
Default Excel 2007 not in foreground when launched in Vista or Windows

This behaviour happens in all of the Vista based OS like Vista, windows 2008,
Windows 7 and Windows 2008 R2. This goes to show that XP would be the
preferred OS for some more time until Vista based OS becomes more reliable
and consistent.

Madan

"OssieMac" wrote:

Hi Madan,

I don't know the reason. I guess that it is something to do with how windows
sets its priorities. However, you should realize that while most of the time
AppActivate is not required with Windows XP, it is not 100% reliable and
sometimes the new application is not the top active window.

I use Outlook to send automated emails and have an option for the user to
Display and edit the email if required. I found that most of the time the
newly created email would be the top active window but sometimes not.

Just for interest an example of the code I use for the newly created email
is as follows (the new Outlook email message takes its window name from the
Subject).

strSubject = "My Test email subject"

AppActivate(strSubject & " - Message")

It does not need the HTML, Rich Text or Plain text that is included in the
window name but it needs the " - Message" appended to the subject name.

--
Regards,

OssieMac