[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] ActiveX - printing a word document
|
You are correct - it is disabled. So is the toolbar item for printing.
Word does not enable all actions when it is an embedded document.
"Sharon Dagan"
<sharon_dagan@xxxxxxxxx To: platform-swt-dev@xxxxxxxxxxx
m> cc:
Sent by: Subject: [platform-swt-dev] ActiveX - printing a word document
platform-swt-dev-admin@
eclipse.org
04/11/2002 10:21 AM
Please respond to
platform-swt-dev
Hi All,
I'm trying to send a Word document the Print command, however, it seems
that this function is disabled?
Here's my code:
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display, SWT.TITLE | SWT.CLOSE);
shell.setLayout(new FillLayout());
OleFrame frame = new OleFrame(shell, SWT.NONE);
OleClientSite clientSite = new OleClientSite(frame,
SWT.NONE, "Word.Document");
clientSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
shell.layout();
shell.open();
Variant vIn = new Variant();
Variant vOut = new Variant();
clientSite.exec(OLE.OLECMDID_PRINT,
OLE.OLECMDEXECOPT_PROMPTUSER, vIn, vOut);
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
Cheers,
--
Sharon Dagan
IT Architect, Software Group
IBM Israel
e: sharon_dagan@xxxxxxxxxx
p: +972-3-9188776 m: +972-52-554776