技術(shù) 點(diǎn)
- 技術(shù)
- 點(diǎn)
- V幣
- 點(diǎn)
- 積分
- 32705
|
On Error GoTo Err_命令111_Click
Dim MyPath As String
Dim Myname As String
MyPath = Left$(CurrentDb.Name, InStrRev(CurrentDb.Name, "\", , vbBinaryCompare)) '從左開始查詢到第一個(gè)\時(shí)從左開始數(shù)的字符數(shù)
Myname = Right(CurrentDb.Name, Len(CurrentDb.Name) - InStrRev(CurrentDb.Name, "\", , vbBinaryCompare)) '從左開始查詢到第一個(gè)\時(shí)從右開始數(shù)的字符數(shù)。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的內(nèi)容寫進(jìn)這個(gè)WORD 文檔 應(yīng)如何寫?
Exit_命令111_Click:
Exit Sub
Err_命令111_Click:
MsgBox Err.Description
Resume Exit_命令111_Click
|
|