Solved

Strange access outlook 2003 issue

Posted on 2013-01-29
10
295 Views
Last Modified: 2013-02-09
Hello everyone, Wondering if someone can help me figure out the gollowing:
i have an access function that loops thru records from a table and assignes all names to a variable, between each record it inserts a vbCrLf character, when done i use the following to send this as an email "        DoCmd.SendObject , , , , , , , sMsg", now when sending it to outlook 2k users it works fine, and when opening it in outlook 2003, the first 15/20 lines are fine, afterwards it keeps the entire recordset in one single line, in other words the new line character gets ignored, please let me know of any solution, thanks
0
Comment
Question by:bfuchs
  • 7
  • 3
10 Comments
 
LVL 24

Expert Comment

by:chaau
ID: 38834006
can you show us some code
0
 
LVL 4

Author Comment

by:bfuchs
ID: 38836509
Set rs = CurrentProject.Connection.Execute(strSql)
    If rs.EOF Then
        MsgBox "No Records To Email", vbInformation
    Else
        'RS.MoveFirst
        While Not rs.EOF
            sMsg = sMsg & rs(1) & ", " & rs(2) & " " & rs(3) & ", " & rs(4) & ", " & sInit & vbCrLf
            rs.MoveNext
        Wend
    End If
    If Len(sMsg) > 0 Then
        DoCmd.SendObject , , , , , , , sMsg
    end if
0
 
LVL 4

Author Comment

by:bfuchs
ID: 38836673
hi, here are some additional info:
1-the program file is a adp connected to sql 2005 back end
2-as mentioned it works fine in outlook 2000, only outlook 2003 is having this problem.
3-let me know if you need more info
thanks
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 24

Expert Comment

by:chaau
ID: 38836807
I think the best option for you will be to do the following.

1. Generate a query that represents the data you wish to send. Open the query in the datasheet view and adjust the column widths and display format.
2. When sending the emails, choose acSendQuery as a first parameter to docmd.sendobject
3. Instead of constructing the message text as a comma separated list of values, send the query itself. The recipient will receive a formatted text that will look exactly as the query you have defined.

If the user really need the comma separated list to enable them importing to a software, then you can send the text as attachment. Let me know if you want me to guide you how to do this
0
 
LVL 4

Author Comment

by:bfuchs
ID: 38836894
since this is an adp, there are no queries that can be created and modified as it would be in a mdb, i guess will need to create a view in sql and modify its sql from within the access project, however we have an access version earlier then the sql (access 2k/2003, sql 2005) therefore when we try to modify objects thru access the application crashes...
0
 
LVL 4

Accepted Solution

by:
bfuchs earned 0 total points
ID: 38837348
tought of an idea, to copy that string to clipboard and have the user paste it, waiting to hear from them if that works...
0
 
LVL 24

Expert Comment

by:chaau
ID: 38837416
Ok, then go with the idea of having the file attached. Make the message body "Please find attached a report for yesterday", generate a file in the temp dir, send it as an attachment
0
 
LVL 4

Author Comment

by:bfuchs
ID: 38837578
hi, waiting to hear first on how users react to the copy to clipboard approach, as it will not require to open attachment, thanks.
0
 
LVL 4

Author Comment

by:bfuchs
ID: 38849844
hi chaau, so far i am staying with the clipboard approach, however if you come up with a solution that will work in the current way, meaning using the popup without having to do any extra work, i am ready to listen, thanks.
0
 
LVL 4

Author Closing Comment

by:bfuchs
ID: 38870848
this was the best way i got it to work without having to ask users to do additional tasks.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question