473,466 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Getting process id of Office-applications

Hi all,
I'm working with a win app in vb that needs access to actual process id of
the office-applications Word, Excel and PowerPoint. I know I can loop the
processes and check for processes of these applications by name etc., but it
will not be good enough, I need to use the exact process id.

I also know that I can get it for Excel by doing as described here:
http://groups.google.com/group/micro...a40849a87c7b02
using hWnd.

Now, I can't find this exposed by Word or PowerPoint. Is it just me not
finding it, or isn't this possible to do with Word and PowerPoint??

Any help is greatly appreciated.
/Henrik

Nov 21 '05 #1
2 2366
"Henrik" <no*****@nomailx.no> schrieb:
I'm working with a win app in vb that needs access to actual process id of
the office-applications Word, Excel and PowerPoint. I know I can loop the
processes and check for processes of these applications by name etc., but
it
will not be good enough, I need to use the exact process id.


What information about the running instances of the Office applications do
you have? If you don't have any information, using the 'Process' class
isn't that bad.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2


"Herfried K. Wagner [MVP]" skrev:
"Henrik" <no*****@nomailx.no> schrieb:
I'm working with a win app in vb that needs access to actual process id of
the office-applications Word, Excel and PowerPoint. I know I can loop the
processes and check for processes of these applications by name etc., but
it
will not be good enough, I need to use the exact process id.


What information about the running instances of the Office applications do
you have? If you don't have any information, using the 'Process' class
isn't that bad.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Well, the only information that I have is the info that I can get from the
instantiated objects for each of word, excel and powerpoint. Such as hWnd
from the excel application object. With that I can get the exact process id
for the excel app for that instantiated object. Now, I don't know how I will
be able to map any running word process that belongs to the app I've created
in my code (such as Dim X As New Word.Application) just using the processes
itself. I know I can get which processes that are word etc., but how will I
know that I can kill the process that is the one I created from the code. I
could perhaps use window titles to try to find out which file is open in
which word process, but since this will be used if there are problems with
the applications (like they've hanged etc.), it isn't always loaded correct.

Thanks again for any help...
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ksskumar2000 | last post by:
Hi, I have added following two reference under COM tab, Microsoft Office 11.0 Object Library Microsoft Word 11.0 Object Library The software I have used: Visual studio 1.14 Microsoft Office...
1
by: tarunsharma_454 | last post by:
hi, i m trying to connect ms access with jdbc odbc bridge. forName(sun.jdbc.odbc.JdbcOdbcDriver) is working well. when i m trying 2 get connection with con.getConnection(jdbc.odbc.office);...
1
by: Fei Yuan | last post by:
Please forgive me re-posting this question since I wasn't clear in my original post. --------> Starting an external process needs to pass it a ProcessStartInfo() object. ProcessStartInfo has a...
3
by: | last post by:
I wrote a class in VB.NET to export the contents of a datagrid to Excel. It works perfectly on my machine, but it fails on my customers' PCs that have identical versions of Win XP (SP1) and Excel...
5
by: SJ | last post by:
I have a VS2005 solution that has a class library and a website. Website has a project reference to the class library in the solution. Whenever I try to build the solution the following two lines...
0
by: imranabdulaziz | last post by:
Dear All, I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2005 as a back End I generated local mode report but as there was no printing option available . I assign...
13
by: chuckie_9497 | last post by:
hello all you gurus. I am struggling with releasing com objects. I have isolated the problem to the code below. Objects are released and the process ends until I use "int k = sheet.Count;" Then...
0
by: TheMattRay | last post by:
I am trying to add an annotations overlay to MS Word (using the InkOverlay class provided by the Microsoft.Ink namespace) in VB.NET. To bind the InkOverlay to Word (or antyhing for that matter), it...
2
by: Manikandan | last post by:
Hi, I have a program written in .Net Framework 1.1 using Visual studio enterprise edition 2003. I tried compiling the same program in visual c# express edition 2005. I'm getting following...
5
by: Mirxon | last post by:
Hello, I'm working on a C program under Ubuntu. It's basd on socket. Browser calls a client cgi (C program), and send some parameters to server (C program). Server runs another program...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.