BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Standard CommandBars for Word

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
John K.
Guest





PostPosted: Fri Jul 28, 2006 1:36 am    Post subject: Standard CommandBars for Word Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.