making toolbars invisible ! 
Author Message
 making toolbars invisible !

Hi there
I want to create a document which based on some custom
template, but it should not have the Usual toolbars like
Formatting,Standard etc....and simply show my toolbar
(eg : DocBaseToolBar)

Note:DocBase is my Custom Template
     DocBaseToolBar is my Custom Toolbar
*************
My code is as follows
Set docNew = docApp.Documents.Add
(Template:="C:\WINDOWS\Application
Data\Microsoft\Templates\DocBase.dot")

and then I write something like this...
    docNew.CommandBars("Standard").Visible = False
    docNew.CommandBars("Formatting").Visible = False
    docNew.CommandBars("DocBaseToolBar").Visible = True
    docNew.CommandBars("Menu Bar").Enabled = False

However when I try to create the doc with this code, for
the first time it does not show me formatting bar,it does
not show me Standard bar....Coool...but hey it does not
show me even my Custom toolbar????....when I Close the
file and try to create one more new file...it shows me my
Custom toolbar....that is the second instance of my App
(deifined in the code)

My question is what am I missing....coding part and even
the understanding part....:)

Also....when I tried writting some code in my custom
template to make the toolbars invisible....Yikes...I ended
up making the toolbars invisible for the word application
itself....

Can anyone please tell me what is happening exactly....

Thanks for reading the Query
Rani



Fri, 16 Jul 2004 17:16:40 GMT  
 making toolbars invisible !
In addition to the visible property, you may want to set enabled to false.

Be sure to have something in your code to reenable them, though when your
template is not active.
--
Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
 --------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


Quote:
> Hi there
> I want to create a document which based on some custom
> template, but it should not have the Usual toolbars like
> Formatting,Standard etc....and simply show my toolbar
> (eg : DocBaseToolBar)

> Note:DocBase is my Custom Template
>      DocBaseToolBar is my Custom Toolbar
> *************
> My code is as follows
> Set docNew = docApp.Documents.Add
> (Template:="C:\WINDOWS\Application
> Data\Microsoft\Templates\DocBase.dot")

> and then I write something like this...
>     docNew.CommandBars("Standard").Visible = False
>     docNew.CommandBars("Formatting").Visible = False
>     docNew.CommandBars("DocBaseToolBar").Visible = True
>     docNew.CommandBars("Menu Bar").Enabled = False

> However when I try to create the doc with this code, for
> the first time it does not show me formatting bar,it does
> not show me Standard bar....Coool...but hey it does not
> show me even my Custom toolbar????....when I Close the
> file and try to create one more new file...it shows me my
> Custom toolbar....that is the second instance of my App
> (deifined in the code)

> My question is what am I missing....coding part and even
> the understanding part....:)

> Also....when I tried writting some code in my custom
> template to make the toolbars invisible....Yikes...I ended
> up making the toolbars invisible for the word application
> itself....

> Can anyone please tell me what is happening exactly....

> Thanks for reading the Query
> Rani



Sat, 17 Jul 2004 05:14:27 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Making the Form invisible but making the controls seen

2. Making a control invisible depending on calculated value in Access'97

3. Making calendar invisible

4. Making a Control invisible !

5. Making a Control invisible !

6. Making a Non-UI (or Invisible at runtime) control

7. making a container contol invisible..

8. Help!!! Making cursor invisible

9. Making MSFlexGrids Invisible?

10. Permanently making a window invisible?

11. Making MSFlexGrid Cols Invisible?

12. Making background of BMP invisible

 

 
Powered by phpBB® Forum Software