Solved

Strange access outlook 2003 issue

Posted on 2013-01-29
10
309 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
10 Comments
 
LVL 25

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 25

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 25

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 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