we are migrating and application from VB6 to DOTNET during this migration all the Word functionality that is present in VB6 should be converted using Aspose.words(.net).
We have two variables related to Word object in VB6
Private WithEvents objWordApplication As Word.Application Private WithEvents objWordDocument As Word.Document
So objWordApplication is Application object and objWordDocuments is document object. Since it is WithEvents we can associate event with this objects. So there are few application object events like
objWordApplication_DocumentOpen - Occurs when the document is opened to application object
objWordApplication_NewDocument - Occurs when a New document is added to application
objWordApplication_DocumentBeforeClose - Occurs when the Document is closed in application
objWordApplication_DocumentBeforePrint - Occurs when user clicks on Print in Word application
objWordApplication_DocumentBeforeSave - Occurs when user clicks on Print in Word application
there is even codes to control the New button and Open button in the ribbon of word application (to disable it or not) like below
With objWordDocument With .CommandBars(strSTANDARD_COMMANDBAR) .Controls(lNEW_BUTTON).Enabled = ppvfNewButtonWasEnabled .Controls(lOPEN_BUTTON).Enabled = ppvfOpenButtonWasEnabled End With With .CommandBars(strMENU_BAR_COMMANDBAR).Controls(lFILE_MENU) .Controls(lNEW_MENUITEM).Enabled = ppvfNewMenuItemWasEnabled .Controls(lOPEN_MENUITEM).Enabled = ppvfOpenMenuItemWasEnabled End With End With
can you please let me know if there a possiblity to control the Word Application events using ASPOSE.WORD and controls the buttons in tool bar or ribbon of word application using ASPOSE.WORD.
Thanks and Regards,