mattkorguk
Registered User.
- Local time
- Today, 01:59
- Joined
- Jun 26, 2007
- Messages
- 301
Hi All,
Firstly, I can't actually find where Outlook 2010 stores the published forms, so that might help with this one!
This is what I have so far, I guess it'll work when the path can be corrected but just scratching my head at the moment...
Using Access 2003 and Outlook 2010.
Firstly, I can't actually find where Outlook 2010 stores the published forms, so that might help with this one!
This is what I have so far, I guess it'll work when the path can be corrected but just scratching my head at the moment...
Code:
Private Sub cmdSurvey_Click()
On Error GoTo Err_cmdEMail_Click
Dim oItem As Outlook.MailItem
Dim oOutlookApp As Outlook.Application
Dim strSurvey As String
Set oOutlookApp = GetObject(, "Outlook.Application")
If MsgBox("Would you like to send a customer survey to " & Me.Source & "?", vbQuestion + vbYesNo, "Email") = vbYes Then
strSurvey = "C:\users\" & Me.Owner & "\appdata\local\microsoft\forms\"
Set oItem = oOutlookApp.CreateItemFromTemplate("database customer survey.oft", strSurvey)
End If
Exit_cmdEMail:
Exit Sub
Err_cmdEMail_Click:
If Err.Number = "2501" Then
MsgBox "You cancelled, therefore survey email not sent.", , "Cancelled"
Else
MsgBox Err.Description
End If
End Sub
Using Access 2003 and Outlook 2010.