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 

Hide Word 2007 UI, Ribbon and QAT in OLE Container?

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






PostPosted: Wed Mar 28, 2007 4:27 pm    Post subject: Hide Word 2007 UI, Ribbon and QAT in OLE Container? Reply with quote



Hi,

I have a similar problem as described in other posts to this group.
However I have not come across any answers that really provide a
solution to my problem.

Using Delphi 7 I have a Form with an OLE container in which I create
a Word document:

oleContainer.CreateObject('word.document', false);

In previous versions of Word it has been a simple task to show a plain
Word document (without any UI elements) in an OLE container. For
instance the following code gracefully hides all the classic Word
97-2003 tool bars:

for i := 1 to FWordDoc.CommandBars.Count do begin
CmdbName := FWordDoc.CommandBars[i].Name;
l := Length(CmdbName);
if (l > 0) and FWordDoc.CommandBars[CmdbName].Visible then
FWordDoc.CommandBars[CmdbName].Visible := false;
end;

Now, the question is simple, but the answer remains illusive,

Is there a way in which I can entirely hide the Word 2007 Ribbon and
Quick Access
Toolbar from my OLE container?

I have rigorously examined the Word 2007 DOM without success. The
closest I find is the Window.ToggleRibbon command which is way out
from
my requirements. I can toggle it's view status, but I can't ask it
beforehand which status it is in. Huh?!...
Another thing I tried was using different object verb commands to
activate my document, also without the desired result.

My objective remains. I want to make the entire UI, Ribbon and QAT
disappear, leaving me with a plain Word document in my OLE container.

Any help and suggestions from the brainy folks out there is
highly appreciated..
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.