472,984 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Handle Events for Word by Using Visual C# .NET

Has anybody tried this code
(http://support.microsoft.com/default.aspx?kbid=302817)?.
When I run the programme it freezes when it reaches the
event handler...
//============ Set up the event handlers ===============

oWord.DocumentBeforeClose +=
.....
Any Idea what's wrong?
(My programme is trying to access the directory of the
word file that is opened)
Nov 13 '05 #1
1 1729
The sample code runs on OfficeXP. What version of Word are you using?

--
Michael R
cr**@tampabay.rr.com

"John" <wi********@hotmail.com> wrote in message
news:07****************************@phx.gbl...
Has anybody tried this code
(http://support.microsoft.com/default.aspx?kbid=302817)?.
When I run the programme it freezes when it reaches the
event handler...
//============ Set up the event handlers ===============

oWord.DocumentBeforeClose +=
....
Any Idea what's wrong?
(My programme is trying to access the directory of the
word file that is opened)

Nov 13 '05 #2

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

Similar topics

0
by: Phillip Wu | last post by:
Hi, I am starting the Word application in Visual Basic. I want my Visual Basic routine to be called when the user closes the document in Word. I am expecting that when the user closes...
7
by: Tony Johansson | last post by:
Hello!! Assume I have a handle body pattern with classes called Handle and Body. In the Body class I store one int value for example 7 or some other integer value. In the Handle class I have...
0
by: askingBoy | last post by:
Hello , I would like to know how to make this : I have a library written in Visual Basic .Net that has some events for its class , I am making an instance of this class in a Visual basic 6.0...
0
by: lkr | last post by:
hi i got the code for handling some of the events in MSWord.But i need ScrollBar events to be handled .i got the handle to the word application window through an API using ForeGroundWindow().By...
7
by: lkr | last post by:
hi is there is anyway to capture the document events of a MSWord?eg:I have to handle the event awhen WM_KEYUP or anyother events will occur. give me a solution............ thanks in advance lkr
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
3
by: Jerry Wei | last post by:
Dear all: I have a problem about how to handle the events. For example, there are two forms, Form1 and Form2. Form2 is owned by Form1 and there is a button,Button1, in Form2. It is no problem for...
10
by: Miro | last post by:
I wanted certain text boxes ( only certain ones ) to always be Trim'd so that spaces are not in the begining, nor the end of the text entered. I created my own "Handle ?" - i hope thats the...
0
AHMEDYO
by: AHMEDYO | last post by:
Hi Every one... With this visual Basic 6.0 Code you can handle more event that visual basic Support as Mouse wheel and hover or you can control event before VB IDE Default Windows proc as...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.