G
Guest
Hi Secret,
Okay, a couple of comments...
What service pack level do you have Office 2000 patched to? I'm fairly
certain that if you have installed SP-3 that you will be treated to these
warning messages.
Since you are not using SendObject, my earlier statement about using the
EditMessage parameter does not apply.
Earlier, you wrote: "The only versions I am looking to run are 2000, 2003,
and 2007." Without using separate physical PC's, or Virtual PC, your only
option to install multiple versions of Outlook (in order to test your code
with the same version of Outlook, to mimic a customer's setup accurately)
would be to configure separate boot drives. The reason I say this is that it
is impossible to install more than one version of Outlook on a given bootable
partition.
Tom Wickerath
Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
Okay, a couple of comments...
When I fire this in A2000 I get no warning message from Outlook.
What service pack level do you have Office 2000 patched to? I'm fairly
certain that if you have installed SP-3 that you will be treated to these
warning messages.
This is what I tested in A2007 and got no warning message.
Since you are not using SendObject, my earlier statement about using the
EditMessage parameter does not apply.
Earlier, you wrote: "The only versions I am looking to run are 2000, 2003,
and 2007." Without using separate physical PC's, or Virtual PC, your only
option to install multiple versions of Outlook (in order to test your code
with the same version of Outlook, to mimic a customer's setup accurately)
would be to configure separate boot drives. The reason I say this is that it
is impossible to install more than one version of Outlook on a given bootable
partition.
Tom Wickerath
Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
Secret Squirrel said:I've pasted some code that I am using currently in my db. This code is behind
one of my forms. When I fire this in A2000 I get no warning message from
Outlook. When I fire it in A2003 I get the warning message. I'm using "Click
Yes" to get around this in 2003. This is what I tested in A2007 and got no
warning message.
Sub SendMessageGenerateTicket(Optional AttachmentPath)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
Dim db As Database
Dim rsEmail As Recordset
Dim stTo, stFrom, stCC, stBCC, stSubject, stSal, stText As String
Dim stQuery As String
Dim stAttachPath As String
stSubject = "RMA#: " & Forms![2005 Form]!RMA
stText = "The Disposition for the RMA noted in the subject line has been
completed. Please generate an 'R' ticket. The original WO# is: " &
Forms![2005 Form]![WO # - Line #]
'Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
'Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
.To = Forms![2005 Form]![GenerateTicket].Column(2)
.Subject = stSubject
.Body = stText
.Importance = olImportanceNormal ' Normal Importance
.Send
'Next
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub
Tom Wickerath said:Here's one way, but I was making the assumption that you are using the
SendObject method, which may not be the case. Type "DoCmd.SendObject"
(without the quotes) into a procedure. Then select this word and press the F1
button to open context-sensitive Help. You should see the following:
The SendObject method carries out the SendObject action in Visual Basic.
expression.SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc,
Subject, MessageText, EditMessage, TemplateFile)
and
EditMessage Optional Variant. Use True (–1) to open the electronic mail
application immediately with the message loaded, so the message can be
edited. Use False (0) to send the message without editing it. If you leave
this argument blank, the default (True) is assumed.
So, if you left this argument blank, you'd get True, which should result in
the message being opened in Outlook and available for you to edit (requires
you to press the Send button).
Tom Wickerath
Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________