How do I tell if Word is starting in Outlook?

D

David Thielen

How can I tell if Word is being started in Outlook or another application
that embeds Word?

If a user is starting Word, I want to pop up a getting started dialog box.
But if it is Outlook causing Word to load, I don't want to do that.

Also, in that case, is there an event I can use to know they are starting
Word itself - and it will be the first instance of Word brought up. I also
don't want to pop up the dialog if they open a second copy of Word.

Is the above clear enough?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
J

Jialiang Ge [MSFT]

Hello Dave,

According to the description, you are wondering how to detect if a word
process is started by user or by a program like outlook, and how to detect
if it is the first word instance. Am I right?

To detect if a word process is started by user or by a program like
outlook, we can check the winword process's parent process name. If its
parent is "explorer", we can generally say it is started by user.
The blog entry http://blogs.msdn.com/bclteam/archive/2006/06/20/640259.aspx
shows a method of getting a process's parent process name.

To detect if it is the first word instance, we can check if
Process.GetProcessesByName("winword") returns an empty arrary in the word
addin's Startup events.

Please let me know if you have any other concerns, or need anything else.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello Dave,

Would you mind letting me know the result of the suggestions? If you need
further assistance, feel free to let me know. I will be more than happy to
be of assistance.

Have a great day!

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top