Solved

Strange access outlook 2003 issue

Posted on 2013-01-29
10
275 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Sometimes Outlook might have problems sending a message. There may be various causes- corrupted PST, AV scanner etc. The message, instead of going to the Sent Items folder, sits in the Outbox indefinitely. To remove it you can use a free tool cal…
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

911 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

20 Experts available now in Live!

Get 1:1 Help Now