> hi to all, I have an issue with a feature of an addin.
>
[quoted text clipped - 13 lines]
>
> thank you!

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
Hi Russ! Thank you very much for the help.
I'm studying the links you showing me, but the code that I'm reading in the
second link, doesn't works:
Dim X As New EventClassModule
Sub Register_Event_Handler()
Set X.App = Word.Application
End Sub
I'm developing an Word Addin using VB .NET and the "Set" keyword, doesn't
exists; when I paste that code in the developing enviroment, the "Set"
keyword disappear, I'm developing a word addin, maybe that code refers to VBA
language.
Anyway,
this is the code I've put in the DocumentBeforePrint Sub in my Word Addin:
Try
MsgBox("Hello World!")
Cancel = True
Catch ex As Exception
MsgBox(ex.ToString)
End Try
I set "Cancel" to TRUE becouse I read this:
Cancel- False when the event occurs. If the event procedure sets this
argument to True, the document isn't printed when the procedure is finished.
So I think I should see the MSGBOX "HelloWorld" and I can't see the window
for Print the Document...it's not true! I can see the MSGBOX and I can see
the window for Print and I can print the active document.
Have you a workaround for my problem?
thank you
Russ - 17 Sep 2007 18:44 GMT
Dev,
Sorry, I know nothing about VB .NET coding. I can only offer some info on
VBA code. You might be able to study VBA code to get an idea about code to
use, but it will be up to you to translate that code to VB .NET.
For example, if you start Word and press ALT F11, it will bring up the Word
VBA Editor. Use the help menu and type in the word 'set' to see what it does
in VBA. Then decide what you would use in VB .NET for doing the same thing.
And of course Google knows everything:
<http://www.google.com/search?&q=%22vb%20.net%22+vba>
We are mostly volunteers in this forum offering info and the forum deals
with word VBA. I suggest you look for a VB .NET forum for more germane
suggestions.
> Hi Russ! Thank you very much for the help.
>
[quoted text clipped - 34 lines]
>
> thank you

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
dev - 18 Sep 2007 00:54 GMT
OK Russ, thank u very much anyway.
bye
Daryl - 28 Nov 2007 01:49 GMT
Hi dev,
Just wondering if you got this to work? I've just started writing a Word
Add-in in VB.Net and have got this to work if you still need a hand.