rtdc
Registered User.
- Local time
- Today, 21:32
- Joined
- Feb 27, 2007
- Messages
- 55
I have been using this sort of code to populate Word with great success
Dim objWord As Word.Application
Dim wrdDoc As Word.Document
Dim strPath As String
strPath = tempath
Set objWord = New Word.Application
With objWord
.Visible = False
.WindowState = wdWindowStateMinimize
End With
Set wrdDoc = objWord.Documents.Open(strPath, , False, False, , , , , , , , True)
wrdDoc.FormFields("ReportNumber").Result = Nz(Forms!frmInvestigation.[ID_Field], "")
wrdDoc.FormFields("ReportedBy").Result = Nz(Forms!frmInvestigation.[ReportedBy], "")
Does anyone have a similar code for doing something similar to Outlook? I would like to populate a Outlook mail template and mail it.
Cheers.
Dim objWord As Word.Application
Dim wrdDoc As Word.Document
Dim strPath As String
strPath = tempath
Set objWord = New Word.Application
With objWord
.Visible = False
.WindowState = wdWindowStateMinimize
End With
Set wrdDoc = objWord.Documents.Open(strPath, , False, False, , , , , , , , True)
wrdDoc.FormFields("ReportNumber").Result = Nz(Forms!frmInvestigation.[ID_Field], "")
wrdDoc.FormFields("ReportedBy").Result = Nz(Forms!frmInvestigation.[ReportedBy], "")
Does anyone have a similar code for doing something similar to Outlook? I would like to populate a Outlook mail template and mail it.
Cheers.