📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "OLE控件"
ClientHeight = 2235
ClientLeft = 60
ClientTop = 345
ClientWidth = 3570
LinkTopic = "Form1"
ScaleHeight = 2235
ScaleWidth = 3570
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "调用Word文件"
Height = 495
Left = 1080
TabIndex = 2
Top = 240
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "退出"
Height = 495
Left = 1200
TabIndex = 1
Top = 960
Width = 1215
End
Begin VB.OLE OLE1
CausesValidation= 0 'False
Class = "Word.Document.8"
Height = 495
Left = 240
OleObjectBlob = "Form1.frx":0000
TabIndex = 0
Top = 240
Visible = 0 'False
Width = 495
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
End
End Sub
Private Sub Command2_Click()
FileName = App.Path + "\zmhh.doc"
'调用Word文档。
OLE1.SourceDoc = FileName
OLE1.SourceItem = FileName
OLE1.Action = 1
OLE1.Action = 7
End Sub
Private Sub Form_Load()
'将窗体移动屏幕中央。
Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
Me.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -