|
On Error GoTo Err_命令111_Click
Dim MyPath As String
Dim Myname As String
MyPath = Left$(CurrentDb.Name, InStrRev(CurrentDb.Name, "\", , vbBinaryCompare)) '从左开始查询到第一个\时从左开始数的字符数
Myname = Right(CurrentDb.Name, Len(CurrentDb.Name) - InStrRev(CurrentDb.Name, "\", , vbBinaryCompare)) '从左开始查询到第一个\时从右开始数的字符数。4代表MDB,1代表MyPath = MyPath + "模板库\编制说明模板.doc"
Dim oApp As Word.Application
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
oApp.Documents.Open MyPath
' 将ME.文本0的内容写进这个WORD 文档 应如何写?
Exit_命令111_Click:
Exit Sub
Err_命令111_Click:
MsgBox Err.Description
Resume Exit_命令111_Click
|
|