Hello all,
Is there someone who have a solution to my problem ?
I have an Excel workbook with an automatic fonction that copy part of a workbook in jpg then sent it using outlook. It used to work fine with Windows 7 and Windows 8 using Office 2013. Now, we are moving to Windows 10 and to Office 2016. I'm getting an error "Execution Error -2147024894 (800070002) File not found"
The code is :
Set Message = Appoutlook.CreateItem(olMailItem)
With Message
TempFilePath = Environ$("temp") & ""
.Attachments.Add TempFilePath & "DashboardFile.jpg", olByValue, 0
...
.HTMLBody = " .... "
.SentOnBehalfOfName = SenderName
.Display
End With
I have try running Excel as administrator and it's working. I have also tried another folder (eg. c:\temp) but got the same result.
But I cannot allow this for the user.
Beside unabling the UAC
Is there someone who have a solution to my problem ?
I have an Excel workbook with an automatic fonction that copy part of a workbook in jpg then sent it using outlook. It used to work fine with Windows 7 and Windows 8 using Office 2013. Now, we are moving to Windows 10 and to Office 2016. I'm getting an error "Execution Error -2147024894 (800070002) File not found"
The code is :
Set Message = Appoutlook.CreateItem(olMailItem)
With Message
TempFilePath = Environ$("temp") & ""
.Attachments.Add TempFilePath & "DashboardFile.jpg", olByValue, 0
...
.HTMLBody = " .... "
.SentOnBehalfOfName = SenderName
.Display
End With
I have try running Excel as administrator and it's working. I have also tried another folder (eg. c:\temp) but got the same result.
But I cannot allow this for the user.
Beside unabling the UAC