I wonder if someone here can help me.
I have a wonderfully working Infopath form until I upgraded my Office to 2010.
Essentially I've created buttons that send e-mails out. Here is an example of the code:
' Create a new MailItem.
Dim oMsg As Outlook._MailItem
oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)
oMsg.Subject =
"subject here"
oMsg.Body = "text here"
oMsg.To =
[email protected]Dim sBodyLen As String = oMsg.Body.Length
' Send
oMsg.Send()
' Clean up
oApp =
Nothing
oMsg =
Nothing
In order to get this working I had to add "Imports Outlook = Microsoft.Office.Interop.Outlook" to the top of the form and add a reference to this in Project explorer.
However when I went to 2010 it broke, I had to add this reference again. Now users are reporting the form does not work with Outlook 2007.
Does anyone know how to fix it so it works on both?
Thanks,
Nick