• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 107
  • Last Modified:

Opening Word from VBA without ribbon

Dear Experts,

I am writing Access Database, which previews HTML code in Word.   Here is the code I am using:

    Set wordapp = CreateObject("word.Application")
    wordapp.Documents.Open FileName:="C:\ECEditor\prvWin.html", ReadOnly:=True
    wordapp.Visible = True

When I open the file, I would like to disable (or not display) the ribbon, so that the user knows that it is only meant for preview.
Is there such switch/parameter?
Please advisel.
0
yballan
Asked:
yballan
  • 2
  • 2
  • 2
  • +1
1 Solution
 
Rgonzo1971Commented:
Hi,

pls try

CommandBars.ExecuteMso "MinimizeRibbon"

Open in new window

Regards
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
According to http://wordribbon.tips.net/T008515_Minimizing_the_Ribbon_for_a_Document.html, the only reliable way is to use   ActiveWindow.ToggleRibbon   for the Application object.
0
 
Martin LissOlder than dirtCommented:
What about using the Word Viewer instead of Word itself?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
yballanAuthor Commented:
Dear Martin Liss,

Thank you for your reply.

I am trying to sell this application, would the user also have to download Word Viewer?
0
 
yballanAuthor Commented:
This worked great!  Thank you!!
0
 
Martin LissOlder than dirtCommented:
...would the user also have to download Word Viewer?
It's a free app so I assume that you can distribute it, but that's something you'd have to verify with Microsoft.
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Didn't look it up, but usually you may not redistribute, but require a download on the target site.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now