R
Rob_Henry
Hello, I have some simple code that we use to email some reports. For some
reason in the last week or so it has stopped working on some machines. All
machines are XPSP2 machines. All have office 2003. Here is a code snippet of
what we doing.
Public Function outlookmessage(olTo, olSubject, olBody, olattachment, ByVal
olsend As Boolean)
Dim olns As Object, olfolder As Object, olitem As Object, olattach As Object
'Dim olapp As New Outlook.Application
Set olapp = CreateObject("Outlook.Application")
Set olns = olapp.GetNamespace("MAPI")
Set olfolder = olns.GetDefaultFolder(6)
Dim objOutlookRecip As Outlook.Recipient
Set olitem = olapp.CreateItem(0)
Set olattach = olitem.Attachments
olitem.To = olTo
The program gives an error at Set Olapp =
CreateObject("Outlook.Application") but only on some machines. It was
working, then users reported that after a MS update it stopped. They have
re-installed office and it still dosn't work.
Anyone have any thoughts? All references are correct.
reason in the last week or so it has stopped working on some machines. All
machines are XPSP2 machines. All have office 2003. Here is a code snippet of
what we doing.
Public Function outlookmessage(olTo, olSubject, olBody, olattachment, ByVal
olsend As Boolean)
Dim olns As Object, olfolder As Object, olitem As Object, olattach As Object
'Dim olapp As New Outlook.Application
Set olapp = CreateObject("Outlook.Application")
Set olns = olapp.GetNamespace("MAPI")
Set olfolder = olns.GetDefaultFolder(6)
Dim objOutlookRecip As Outlook.Recipient
Set olitem = olapp.CreateItem(0)
Set olattach = olitem.Attachments
olitem.To = olTo
The program gives an error at Set Olapp =
CreateObject("Outlook.Application") but only on some machines. It was
working, then users reported that after a MS update it stopped. They have
re-installed office and it still dosn't work.
Anyone have any thoughts? All references are correct.