×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

VB6.0 and Word

VB6.0 and Word

VB6.0 and Word

(OP)
I have an VB6 routine that shows a word document. I'd like this document without commandbars and menu bar (File Edit...), but this configuration can not be saved (do not change default Word). How can I do that?

Thanks,

Paiva

RE: VB6.0 and Word

If you're controlling word with VB - I would have thought you could load the doc into word and hide the commandbars and menu bar *before* making that copy of word visible?

Did I misunderstand you?

Mike
---
Mike_Lacey@Cargill.Com

RE: VB6.0 and Word

(OP)
Here goes the routine code:

Public Sub AbreDocumentoWord(Documento As String)

Dim A As New Word.Application

A.Visible = True
A.Documents.Open FileName:=Documento

A.WindowState = wdWindowStateMaximize

'Desabilita barras de ferramentas
A.CommandBars("Standard").Visible = False
A.CommandBars("Tables and Borders").Visible = False
A.CommandBars("Formatting").Visible = False
A.CommandBars("Database").Visible = False
A.CommandBars("Drawing").Visible = False
A.CommandBars("Visual Basic").Visible = False
A.CommandBars("Stop Recording").Visible = False
A.CommandBars("Microsoft").Visible = False
A.CommandBars("AutoText").Visible = False
A.CommandBars("Web").Visible = False
A.CommandBars("WordArt").Visible = False
A.CommandBars("3-D Settings").Visible = False
A.CommandBars("Shadow Settings").Visible = False
A.CommandBars("Picture").Visible = False
A.CommandBars("Reviewing").Visible = False
A.CommandBars("Control Toolbox").Visible = False
A.CommandBars("Forms").Visible = False

'RĂ©gua
A.ActiveWindow.ActivePane.DisplayRulers = False

'Janela Normal
If A.ActiveWindow.View.SplitSpecial = wdPaneNone Then
A.ActiveWindow.ActivePane.View.Type = wdNormalView
Else
A.ActiveWindow.View.Type = wdNormalView
End If
End Sub

i don't known how to hide menu bar and not save this settings. help me.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close