Solved

Strange access outlook 2003 issue

Posted on 2013-01-29
10
266 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 3

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 3

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
 
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 3

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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 3

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 3

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 3

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 3

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now