none
Print command not working in SWT OLE embedded viewer for Office 2010 RRS feed

  • Question

  • We have an Eclipse RCP application that embeds Word 2007 in one of the views using SWT OLE. The word document opened has some Ribbon UI customization. 'Print' command is enabled and user can invoke 'Print' via the ribbon or the 'Ctrl+P' shortcut. All this works fine when we use Word 2007.

    In Office 2010, Microsoft introduced the 'backstage' view and "print" functionality moved to backstage. There's no dialog that pops up when we invoke print. This is creating problems for us. Whenever user invokes 'Print', the whole RCP application hangs for a while and then crashes.

    Any ideas on what could be causing this crash? Is there a 'hack' to bring the print dialog back instead of backstage?

     

    Thanks, Naveen

    Thursday, November 24, 2011 9:36 AM

Answers

  • Hi Naveen

    Well, you should be able to display the dialog box using (in Word VBA-speak): Application.Dialogs(Word.WdWordDialog.wdDialogFilePrint).Show and the user's choice should be executed.

    But in order to use this instead of backstage you'd require a ribbon customization that replaces the built-in command with your version of it (showing the dialog box as above).


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bruce Song Wednesday, December 7, 2011 10:48 AM
    Monday, November 28, 2011 8:01 AM
    Moderator