I am having an problem with Outlook 98. I am creating in VB an email message with an attachment. However I do not fill the SenderName property. I do'nt know how to since it is a read only property. I get an error from outlook which says something like "someone is trying to send an email. Could be a virus. are you sure"
I wanted to find out how I can fill the sendername value even if Outlook is not open and also do a name resolution in Outlook.
Appreciate all the help
Here is a sample code
I am using the Outlook 98 object reference
Dim objOutlook As New Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
If Len(txtemail) > 0 Then
'Create a message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
.To = txtemail.Text
.Subject = "Request for Quotation"
.Body = "Dear " & txtAttention & vbNewLine & vbNewLine
.Body = .Body & "Please quote price and delivery for the following parts" & vbNewLine
.Body = .Body & "in the attached EXCEL spreadsheet and return" & vbNewLine
.Body = .Body & " THANK YOU" & vbNewLine
.Importance = olImportanceHigh
Set objOutlook = Nothing