VB 中OLE 加载 Word 文档,如何不显示Word菜单
发布网友
发布时间:2024-10-03 20:28
我来回答
共1个回答
热心网友
时间:2024-10-04 04:51
Dim recWord As Object
Dim recDocument As Word.Document
Dim mMenuBar As CommandBar
Set recWord = Nothing
If (recWord Is Nothing) Then
Set recWord = CreateObject("word.application")
End If
Set mMenuBar = recWord.Application.CommandBars("Menu Bar")
mMenuBar.Controls(1).CommandBar.visible=false'
屏蔽掉第一项菜单,以后的菜单同理即可