windows 7 to 10 - runtime error (1 Viewer)

GaryPanic

Smoke me a Kipper,Skipper
Local time
Yesterday, 21:24
Joined
Nov 8, 2005
Messages
3,296
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***
 

GaryPanic

Smoke me a Kipper,Skipper
Local time
Yesterday, 21:24
Joined
Nov 8, 2005
Messages
3,296
references loaded
Visual Basics for Applications
microsoft Access 14. object library
OLE automation
Microsoft Office 14.0 Access database engine objecvt
Microsoft Internet controls
microsoft office 14.0 object library



if this helps
 

GaryPanic

Smoke me a Kipper,Skipper
Local time
Yesterday, 21:24
Joined
Nov 8, 2005
Messages
3,296
very weird
have resolved - but needs more thinking about
I put = "" & !EMail and it works -
 

Users who are viewing this thread

Top Bottom