Upgrade 2 XP and 2003 messed up email

Timoty

Registered User.
Local time
Today, 02:31
Joined
Jul 29, 2003
Messages
105
Good day all.

I had a small database that worked perfectly fine. My organization just 'upgraded' from Windows 2000 to XP and from Office 2000 to Office 2003. One of the functions was to generate a report and send the information to a set of email recipients at the click of a buton. The information was 'spit' directly into an email as formatted RTF information. Worked flawlessly. Now, after the upgrades, the information gets stuck into the email as code instead of being nicely formatted. I have confirmed that outlook is in HTML and not RAW text format. I don't know if this is an access issue, XP issue, Outlook 2003 issue, a security issue, or some combination of the above:

The code for the buton click is as follows:

Private Sub Command36_Click()

DoCmd.GoToRecord , , acPrevious
DoCmd.GoToRecord , , acNext

Dim stDocName As String
Dim strPath As String
Dim strTemp As String
Dim strBody As String
Dim strEmail As String
Dim rstEmail As DAO.Recordset
Dim EmailApp As Object
Dim NameSpace As Object
Dim EmailSend As Object


Set rstEmail = CurrentDb.OpenRecordset("Addresses")

Do Until rstEmail.EOF
strEmail = strEmail & rstEmail("EmailAddress") & ";"
rstEmail.MoveNext
Loop

If Right(strEmail, 1) = ";" Then
strEmail = Left(strEmail, Len(strEmail) - 1)
End If


strPath = DLookup("TextPath", "Filepath")


DoCmd.OutputTo acReport, "Email", acFormatRTF, strPath

Open strPath For Input As #1
Do Until EOF(1)
Line Input #1, strTemp
strBody = strBody & strTemp & vbCrLf
Loop
Close #1
Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.getNameSpace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)

EmailSend.To = strEmail
EmailSend.subject = "EMERGENCY"
EmailSend.Display
EmailSend.Body = strBody

Set EmailApp = Nothing
Set NameSpace = Nothing
Set EmailSend = Nothing

Kill strPath
rstEmail.Close
Set rstEmail = Nothing


End Sub

Any help would be appreciated.

Thanks
 
The first thing I would look at is check the references.... See anything that says "Missing"???
 
Sorry, I was away for the Canadian Thanksgiving weekend. I will take a look and get back.
 

Users who are viewing this thread

Back
Top Bottom