Hi guys
we have had windows 7 upgrade to 10 and I am getting the following
runtime error -2147417851 (80010105)
Method to of object mailitem failed
I presume its a reference issue any pointers would be welcome
Dim frm As Form
Const bq As String = "<blockquote>"
Const bqe As String = "</blockquote>"
Dim EmailApp As Object, NameSpace As Object, EmailSend As Object
Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.GetNamespace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)
Set frm = Forms!quotefrm
'try thefollwoing
Dim BodyA As String
Dim BodyB As String
Dim Emailstring As String
Signature = Environ("appdata") & "\Microsoft\Signatures"
If Dir(Signature, vbDirectory) <> vbNullString Then
Signature = Signature & Dir$(Signature & "*.htm")
Else:
Signature = ""
End If
Signature = CreateObject("Scripting.FileSystemObject").GetFile(Signature).OpenAsTextStream(1, -2).ReadAll
With frm
EmailSend.to = ! **** Fails here***
we have had windows 7 upgrade to 10 and I am getting the following
runtime error -2147417851 (80010105)
Method to of object mailitem failed
I presume its a reference issue any pointers would be welcome
Dim frm As Form
Const bq As String = "<blockquote>"
Const bqe As String = "</blockquote>"
Dim EmailApp As Object, NameSpace As Object, EmailSend As Object
Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.GetNamespace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)
Set frm = Forms!quotefrm
'try thefollwoing
Dim BodyA As String
Dim BodyB As String
Dim Emailstring As String
Signature = Environ("appdata") & "\Microsoft\Signatures"
If Dir(Signature, vbDirectory) <> vbNullString Then
Signature = Signature & Dir$(Signature & "*.htm")
Else:
Signature = ""
End If
Signature = CreateObject("Scripting.FileSystemObject").GetFile(Signature).OpenAsTextStream(1, -2).ReadAll
With frm
EmailSend.to = ! **** Fails here***