|
|
|
date: Fri, 14 Sep 2007 15:34:02 -0700,
group: microsoft.public.word.vba.addins
back
Re: BUG on Framework??
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.
>
> 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
drsmN0SPAMikleAThotmailD0Tcom.INVALID
date: Mon, 17 Sep 2007 13:44:04 -0400
author: Russ LID
|
|