0

Here is what I am trying to do:
From VB.net open a word template --- Done
Populate it from a database ------Done
Have word report back with the saved file name so as I can add it to the database history ----Not done.

I know is has something to do with the close events in word but I am unable to get it working.
I have made a class which I think should work:

Dim WithEvents wordApplication As New Microsoft.Office.Interop.Word.Application

this gives me a drop down for

Private Sub wordApplication_DocumentBeforePrint(ByVal Doc As Microsoft.Office.Interop.Word.Document, ByRef Cancel As Boolean) Handles wordApplication.DocumentBeforePrint

but I dont know how to invoke this routine.

Any help greatly appreciated.

2
Contributors
2
Replies
4
Views
4 Years
Discussion Span
Last Post by UKnod
0

thanks for the info, I have tried that already but it refers to VS2002 and wordXP I am using VS2008 and word 2003, so when I try to run that code it doesn't work.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.