1
我想弄清楚是否有一種方法可以將我合併到文檔中的代碼設置爲if ...然後,基於表中字段中特定文本的不同文檔。訪問郵件根據特定標準合併到不同的文檔
我的代碼有效。
Sub SendConfirmation_Click(CourseNumber As Index)
DoCmd.SetWarnings False
DoCmd.OpenQuery "ConfirmationMailMerge"
Dim LevelIConf As String
Dim OpenWord As Object
'Path to word document
LevelIConf = "G:\POSTPROFESSIONAL\NAIOMT\Classes\PTH536 Level I\LevelIConf.doc"
'Create instance of Word
Set OpenWord = CreateObject("Word.Application")
OpenWord.Visible = True
'Open the document
OpenWord.Documents.Open FileName:=LevelIConf
DoCmd.SetWarnings True
End Sub
我有幾個課程,我發出的確認信件,每個字母是不同的基礎上的課程。我希望能夠按下表格上的按鈕並根據課程編號提供正確的文檔。
任何幫助表示讚賞。我是一位自學的編碼員,仍然有很多東西需要學習。
感謝,