 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
John K. Guest
|
Posted: Fri Jul 28, 2006 1:36 am Post subject: Standard CommandBars for Word |
|
|
Hi,
I use TWebBrowser to view a Microsoft Word document in a form (is there
any better way?).
And I want the user to be able to edit, save, and print the document.
Here is my code:
// Uses WordXP;
procedure TForm1.WebBrowser1NavigateComplete2(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
var
Doc: _Document;
Btn: OleVariant;
begin
Doc := WebBrowser1.Document as _Document;
with Doc do
begin
Application.DisplayStatusBar := FALSE;
Application.ActiveWindow.View.ShowAll := FALSE;
Application.ActiveWindow.View.TableGridlines := FALSE;
Application.ActiveWindow.DisplayRulers := FALSE;
btn := CommandBars['Reviewing'];
btn.Visible := FALSE;
btn := CommandBars['Standard'];
btn.Visible := TRUE;
ActiveWindow.View.type_ := wdPageView;
end;
end;
However, when the user click the "Save" button or the "Print" button
from the "toolbar", it does not show the dialog.
Is it possible to show this default dialog ?
Thanks.
-- |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|