Solved

MS Access 2007 / MS SharePoint problem with Outlook e-mail

Posted on 2011-03-24
6
251 Views
Last Modified: 2012-05-11
I have recently split my MS Access database, with the backend being on SharePoint.  Everything seems to work really well.  Some minor issues, but no show stoppers.  Well, that's what I originally thought anyway.

Here's the problem:

I have a button on my MS Access form that takes the information from the fields on the Access form and creates a formatted e-mail message.  The VB code uses .HtmlBody for the body of the e-mail.  When I hit the button everything works perfectly.  The information is taken from the form and populated on to the Outlook e-mail just like it should; however, when I send the e-mail, all the data is stripped and left with some of the html formatting code.  It is very strange.  The information is there in the e-mail, but when I hit the send button, I look at the sent e-mail and the information is gone.

Even stranger is that the Subject line of the e-mail is unaffected.  It works perfectly fine.

If anyone has encountered this problem or can point me in the right direction I would be extremely thankful.
0
Comment
Question by:cgraziano
[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
  • 3
6 Comments
 
LVL 85
ID: 35212386
How are you creating the .HTMLBody string? You should try building a Variable and using that:

Dim sBody As String

sBody = WhateverMethodYouUseToBuildHTMLBody

Now use the sBody variable instead of .HTMLBody
0
 

Author Comment

by:cgraziano
ID: 35212597
Thanks for the suggestion.  Unfortunatley, I will not have access to my database until tomorrow morning.  I will try this out first thing.

One question though.  I used .HtmlBody because I needed the e-mail to be formatted with bolding and underlining.  Will I be able to accomplish that using the sBody string method you mentioned?

But, how does this explain Outlook stripping the e-mail of all the information?  Like I said, the e-mail is created with all the appropriate data and in the correct format, but is blank after being sent.  I originally thought it was a Outlook problem, but then started to think it may have something to do with the SharePoint permissions.  I used the same exact code before I split the database between Access and SharePoint and everything worked fine.  The problem didn't start until I started using SharePoint as the backend.

I was also just thinking about playing with Outlooks external editor settings under the e-mail options, mail formatter.  Maybe switching it to use MS Word as the default e-mail editor for all new e-mails.  Any thoughts?

Thanks
0
 

Author Comment

by:cgraziano
ID: 35216902
Ok.  I found out what the problem was.  It has soemthing to do with the HTML message formatter.  When I switch the e-mail to Rich Text it is sent perfectly.  So, then I went and changed the Mail Format for the MS Outlook 2007 inbox from HTML to Rich Text, but when I use my Access form to create the e-mail it changes the message format back to HTML.  I think since I am using the .HtmlBody in the VB code it is automatically converting it back to HTML.  Rather than relying on the user to change the message format for every message, I would like to create a way to have it done automatically.  I can think of only two options:

Change the .HtmlBody in the VB code.  I tried using the sBody method suggested by LMS but it did not like the html code code used in the body, and produced a blank message.  Instead of using .HtmlBody or .Body is there a rich text version I could use?

Or, is there a code I code put at the end of the e-mail code that will automatically convert the e-mail to Rich Text after the information has been added to the e-mail?

Any suggestions would be very helpful.  

Thank you  
0
 

Author Comment

by:cgraziano
ID: 35217082
I ended up using a .BodyFormat = olFormatRichText at the end of my e-mail code to switch the e-mail back to Rich Text.  I have to do a little more testing to ensure none of the formatting was lost, but initial indications look good.
0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 36260796
Question PAQ'd and stored in the solution database.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

617 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