473,385 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Getting InkOverlay and WinWord playing together nicely

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 accepts a handle (InkOverlay.Handle) of the window.

I have tried using the PIAs for office to start Word (word.application), but can't find a way to get the window handle from it to attach to the InkOverlay object. Lately I have been using the System.Diagnostics.Process to start "WinWord" and retrieve the MainWindowHandle from it, but I get the error that the process has exited already (see code below).

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim P as New Process
  3.  
  4. With P.StartInfo
  5.             .FileName = "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE"
  6.             .WindowStyle = ProcessWindowStyle.Maximized
  7.             .UseShellExecute = False
  8.         End With
  9.  
  10.         P.Start()
  11.         WinHandle = P.MainWindowHandle
  12.  
  13.  
I am looking for any assistance you can provide.

-Matt Ray
Jul 5 '07 #1
0 1026

Sign in to post your reply or Sign up for a free account.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
2
by: infidel | last post by:
I've been trying to get my CherryPy server to authenticate users against our network. I've managed to cobble together a simple function that uses our LDAP server to validate the username and...
0
by: Just D. | last post by:
Guys, I'm writing the Windows Application and one of the ideas is to use a RichText field to store/show some formatted text, probably with pictures. The problem is that this RichEdit control is...
2
by: Robin Tucker | last post by:
Hi, I am diligently releasing (Marshal.ReleaseComObject (o) ) all references I pick up while generating a report using VB.NET in my software. At least, I *think* I am. However, when I have...
3
by: Dean Slindee | last post by:
The code below is being used to launch WinWord.exe from a VB.NET program. Word launches, but displays this error message: "Word has experienced an error trying to open the file. Try these...
0
by: Matt Ray | last post by:
I have by trying (without success) for over a week ot get InkOverlay to attach to a freshly-created MS Word application window. Does anyone have working code (vb.net preferred, but I can translate...
1
by: tvjraman | last post by:
Visual Basic 6 I use Getobject() to get the object of Word application. I always get the first instance of Winword.exe I have a macro in another instance of Winword.exe I need to get the...
2
by: Dean Slindee | last post by:
Using this statement to utilize the spell checker in WinWord: WinOffice.clsWord.SpellChecker(txtNote.Text) 'this does not work because no main window is displayed 'Dim proc =...
2
ajester
by: ajester | last post by:
I need WinWord to look like it's being executed from the correct path: C:\Program Files\Microsoft Office\Office12\WinWord.exe when in reality it's being launch from a Java app using the path...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.