How to hide or disable toolbars and ribbon in word with vba or vb6

I am trying to hide or disable the ribbon and toolbars in Word 2007, within 
a VB6 program, but have been unable to get it to work.

I am using early binding so that I can see the Word objects and methods, but 
have been unable to find a combination that will work on my files.

Have tried
Dim wrd As Word.Application
Dim obar As Office.CommandBar

        For Each obar In wrd.CommandBars
            obar.Enabled = False
            obar.visible = False
       Next

I assume there is something I am missing here. What would be the best way to 
do this?

Thanks,
Norm 

1
Norm
3/9/2010 11:55:28 PM
word.vba.general 1023 articles. 1 followers. Follow

0 Replies
3434 Views

Similar Articles

[PageSpeed] 11

Reply:

Similar Artilces:

Hiding "0" values in pivot table
In a worksheet I have a listing of stock records with ItemNumber, Date, StockLocation and NumberOnStock. When I make simple Pivot Table with ItemNumber and StockLocation as rows and select a Sum of "NumberOnStock" I would like to hide rows where the sum is "0". But this does not seem to be possible. Tried to follow the guidelines in the Microsoft article: http://office.microsoft.com/en-us/assistance/HP051998791033.aspx#Hide%20zero%20values%20in%20a%20PivotTable%20report But no luck :-( Mogens You could use conditional formatting on these cells - highlight the cells,...

Compile VBA script to make it portable to other computers
Hi, I made a Word VBA script, which doing various operations on file and headers, footers, etc and i want to move it to other computers. How this can be done? Is there a way to compile script? "huk" <piotr.huk@gmail.com> wrote in message news:44e8e2b7-34ef-479f-8509-db99cef04571@l19g2000yqb.googlegroups.com... > Hi, > I made a Word VBA script, which doing various operations on file and > headers, footers, etc and i want to move it to other computers. How > this can be done? Is there a way to compile script? Distributing macros to other users http://...

Hiding formuals in cells question
Hi. I was wondering if there was a way to hide the formulas in cells without protecting the sheet. I am making something for other teachers at my school and I want to hide the formulas so they won't mess anything up on the spreadsheet. Any help would be greatly appreciated. Thanks! Hi not without protecting the sheet but why is this a problem for you? -- Regards Frank Kabel Frankfurt, Germany "JP" <JP@discussions.microsoft.com> schrieb im Newsbeitrag news:ABFE07BF-6087-4E24-814A-03AF8863A633@microsoft.com... > Hi. I was wondering if there was a way to hide the fo...

hide my name
When replying to an email or creating one from scratch how do i hide my name in the "from" field...thx fred <fdbjrgetridofthis@wowway.com> wrote: > When replying to an email or creating one from scratch how do i hide > my name in the "from" field...thx Are you saying you want the reply to be anonymous? -- Brian Tillman [MVP-Outlook] no, I don't mind if my email is revealed.. just my name. I have tried by removing it from the "User Name:" field in the email account but it continues to show up. I have also removed from the header informati...

Excel startup bug: VBA Run-time error 76??
Help, please. Yesterday, Excel started giving me error messages whenever I start it up. I uninstalled Office 2000, reinstalled it, and I still get the same error. Here is what happens. MS Visual Basic displays a dialog box that says: Run-time error '76': Path not found When I hit the debug button, it highlights (in yellow) the following line of code: lengthOfFile = Filelen(registryValue) What should I do to fix this annoying problem? Steve Delete the ZZZ. It keeps spam off the server. Start it with a switch "C:\program files\microsoft office\office\excel.exe" /...

Hiding and Un-Hiding Data fields
I am using a form for people to select data via dropdown menus and then having it run through a query to filter results. Is there a way that I can have certain feilds hidden until a toggle button or something of the like is clicked? Basically I want have three choices of buttons: Year, Quarter, and Month. What I ideally want to happen is when someone selects the button for year, a hidden drop down menu appears where they can then choose from the available years to filter through the query. I would say I am above average with using access, but I have no idea how to hide fields and then...

How do I hide gaps in an Excel 2007 chart?
I have a bar chart that is showing gaps and i don't want them. The select data > hidden and empty cell button does not give an option to hide gaps. I think by default they are hidden but if you even click on this to see what it does the gaps are shown and no way to turn off. Hi, If you hide the actual rows then with the Plot visible cells only setting on the gaps will be removed. In xl2007 the setting is on the Select Data dialog, Hidden/empty cells button. Cheers Andy Waynesch wrote: > I have a bar chart that is showing gaps and i don't want them. The s...

Hiding a worksheet #3
I want to hide a worksheet. So, I went to the format menu and the "worksheet" option is grayed out. Why? And, how do I "ungray" it. Hi is your worksheet protected ? -- Regards Frank Kabel Frankfurt, Germany llong wrote: > I want to hide a worksheet. So, I went to the format menu and the > "worksheet" option is grayed out. Why? And, how do I "ungray" it. I think Frank meant to ask about the Workbook--not the worksheet. (Check under Tools|protection|Protect workbook or Unprotect workbook) My question is: Is there another sheet in the w...

Hide images when Hiding Rows
I have inserted images into cells, but when I hide the column the images are not hidden with that column, they just get squished between the two cells next to the hidden cell. Is there a setting or way to tie the image to that cell so that it hides/unhides appropriately with the row? -- kurt ------------------------------------------------------------------------ kurt's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=35686 View this thread: http://www.excelforum.com/showthread.php?threadid=554712 Kurt You cannot insert an image into a cell. You can overlay ...

link word table to excel table
If have a world table with 5 rows and 5 columns and a corresponding rows/columns in excel, can I link the word document to the exce document? This way, if I change the excel figures, this will chang the figures in word? I have tried the insert database function but this leaves me with onl the 'crap' generic autoformats for the table. I have a format I wan to keep. Any ideas? Thanks.. -- Message posted from http://www.ExcelForum.com Pobuckley, you can enter the data in Excel, then cell by cell you can copy and Paste Special > Paste Link as unformatted text into Word. The...

how to hide an ActiveX control?
hi there i have an ActiveX control, written in C++, which has the OLEMISC_INVISIBLEATRUNTIME flag set, yet when i display the web page it is attached to, i get the familiar "red cross" graphic in the middle of the screen - how can i hide the control so nothing is displayed at all? tia bhu can u set the size of ur control as 1x1 pixels "bhu Boue vidya" <bhuvidya@yahoo.com.au> wrote in message news:1175703214.292931.252210@e65g2000hsc.googlegroups.com... > > hi there > > i have an ActiveX control, written in C++, which has the > OLEMISC_INVISIBLEATR...

Hiding plot Area
I have a formatted output sheet that has a Pie Chart embedded. The data for the pie chart comes from a second sheet using 2 ranges B2:B6 & D2:D6 B2:B6 is always populated and contains labels. What I want to do is, when D2:D6 contains 0 in each cell (or Null), suppress the Pie chart but always show the Legend (which is driven by B2:B6) Many Thanks Adam Adam - All you see of the pie when all values are zero is a single line at the first slice. The legend still appears. To hide the line, double click on one of the wedges and on the Patterns tab, change the Border setting to None. ...

Trouble with toggleButtons on ribbon
Hi, I have two custom toggle buttons on a ribbon and my code looks okay to me, but obviously I've done something wrong because everytime I click either one, I get "Object variable or with block variable not set" error; my code is below, can someone PLEASE help me out with this? Public gRibbonUI As IRibbonUI Public gbPressed1 As Boolean Public gbPressed2 As Boolean 'Callback for customUI.onLoad Sub rxRibbonUI_onLoad(ribbon As IRibbonUI) Set gRibbonUI = ribbon End Sub 'Callback for rxTB1 getLabel Sub BalAct_getLabel(control As IRibbonControl, ByRef retu...

hiding rows
I have data in cells A7:DK394 which all have 0 in them until totals are added in other worksheets which then pullthrough. At the end of the week I have to Hide all rows from A7 to A394 that still have 0 in them as no totals have been added in other sheets so the customer has not posted with us. is there any way excell can recognise the cells that have no data against them and hide them automatically by pressing a button. or if they all start off hidden unhide as data is entered. Hopefully this makes sense many thanks for any help with this as again its to save me lots of...

Add a comma at the end of a word in a cell
I have cities in a column and I would like to add a comma at the end inside the cell. how do I do that? Say your cities are in column A. In a helper column, enter =A1 & "," and copy down. Then copy the helper column and paste/special value back into your original column. -- Gary's Student "Angela" wrote: > I have cities in a column and I would like to add a comma at the end inside > the cell. how do I do that? I'm assuming you want a formula for this. With the city in A1: =A1 & ", " The formula above also includes a space afte...

date mask via vba?
Anyone have any code to simulate a date mask on a Word form that works like a date mask on an Access form. i.e. slashes are automatically entered as user types a date in the format mm/dd/yyyy If this is a protected form field, set its property type to Date and apply a mask. Protect the form, then any valid date input will be converted to match your mask. No vba required. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http:/...

Hiding rows with VBA
Hi all, In my sheet called "insertsheet I have this VBA: (thanks to some users of Google groups) Private Sub Worksheet_Change(ByVal Target As Range) Const nMAX As Long = 10 Dim nRows As Long Application.ScreenUpdating = False With Me With .Range("B8") If Intersect(Target(1), .Cells) Is Nothing Then Exit Sub nRows = .Value End With .Range(.Cells(1, 5), .Cells(1, _ .Columns.Count)).EntireColumn.Hidden = True .Range(Cells(1, 5), .Cells(1, _ ...

How do I hide email addresses in outgoing mail
Hint: You post your question in the body of the post, not the Subject. Hint 2: Use the BCC field. -- Russ Valentine [MVP-Outlook] "Dennis" <Dennis@discussions.microsoft.com> wrote in message news:B2C2A70C-6C94-4688-8BAF-0A50AC9C142D@microsoft.com... > "Dennis" <Dennis@discussions.microsoft.com> wrote in message news:B2C2A70C-6C94-4688-8BAF-0A50AC9C142D@microsoft.com... > PLEASE write your question in the body of the post and NOT just the subject Have a look here: http://dts-l.net/goodpost.htm As posted here MANY MANY times - put them in the BCC...

Outlook-hiding recipients addresses
How do you send a mailing to a distribution list without exposing their email addresses to the other recipients? Put the DL name in the BCC field and put your own address in the TO field. anonymous@discussions.microsoft.com wrote: > How do you send a mailing to a distribution list without > exposing their email addresses to the other recipients? ...

Hide contacts
I must hide some contacts from GAL excepted for 2 user that must to see them and select to send email. If only 2 users need a Contact, why not have them create it in their Contacts folder? -- Bharat Suneja MVP - Exchange www.zenprise.com NEW blog location: www.exchangepedia.com/blog ---------------------------------------------- "MauroR" <MauroR@discussions.microsoft.com> wrote in message news:DAC0E2E9-7389-49F0-8736-3B9251DBB274@microsoft.com... >I must hide some contacts from GAL excepted for 2 user that must to see >them > and select to send email. Th...

My Themes in Word 2007 do not work.
Is there a file I can delete to reset to the original program settings, or a way I can activate themes? At present I can only use my customized fonts in Normal. --TJ Please explain what it is about themes that doesn't work. Is it that the fonts or colors that don't change when you click a different theme? Or that the choices of themes, colors, etc. don't appear in the menu? Pam tantejoan wrote: >Is there a file I can delete to reset to the original program settings, or a >way I can activate themes? At present I can only use my customized fonts in >...

Can I Hide a Field?
I'm wanting to hide a field on a form (products form in this case) for some users but not for other users. Is this possible? For example, can I hide the product cost (wholesale) of an item for the salesperson, but not for the CEO? -- Brandon IT Director Office Equipment & Supplies at http://www.presentationsdirect.com Hi Brandon, You cannot have different formlayouts for different users/Teams at this time... Regards, Michael Randrup "Brandon S." <bsmith@presentationsdirect.nospam.com> wrote in message news:e4pDiMrYDHA.1620@TK2MSFTNGP12.phx.gbl... > I'm ...

disable annoying flash update notices
This is a multi-part message in MIME format. ------=_NextPart_000_0020_01CB13CC.8ABFE8C0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable To disable Flash auto-update: 1. Create a file named mms.cfg (text) in a text editor. 2. Add the following auto-update setting: AutoUpdateDisable=3D1 <<< add this to disable updates, use = '0' (zero) to turn updates on again =20 3. Save the mms.cfg file to \Windows\System (W98) or SYSTEMROOT%\System32\Macromed\Flash (NT) ...

Hide Unhide Hide again
Hello, I'm using Excel 2003. It seems in the older versions, when I hid a column or row, it would put a little "+" tab above the labels. You could easily "click" or "unclick" ("hide" or unhide") the columns or rows. I need to be able to hid these rows or columns, but unhide them for use and then hid them again for ease of use and printing. Thank you. Hiding rows/columns and Grouping/Outline are quite different features. The little + sign occurs when you group (outline) it's not actually hiding rows Its under the DATA > GROUP AND O...

How do hide tracking changes from various users in Word 2007
I would like to hide the tracking changes in Word 2007 as a document is passed from user to user. Presently, every time a user opens the file that I have sent them, the file opens showing all the tracking changes. I would like it to Open and not show the tracking changes and just have the user do their changes. the users are getting confused by all the markups. I have tried the procedures mentioned which are: 1) Trust Center - Privacy Options 2) remove check for "Make hidden markup visible when opening or saving" Is the procedure that I listed supposed to work? What wil...