Access query Exports to Excel and Memo Field has HTML Codes - Why?

gdunn59
gdunn59 used Ask the Experts™
on
I have attached my code for review.

The problem I am experiencing is when the query is exported to an Excel Spreadsheet, the Memo field in the query contains weird characters mixed in the text, i.e.:

  <div><font face=Arial size=2>E&amp;C received a question from HR about

What is causing this, and how can it be avoided?

I am using MS Access and Excel 2007.

Thanks,
gdunn59
Private-Sub-cmdExportCaseData.docx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Is the memo field set to rich text?  You may need to change it to plain text in both the table properties and also the properties for that field if it exists on a form.
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
<No Points wanted, as it seems that trbaze has answered your direct question here>

In Office 2007 and newer, you can format the data stored in the tables.
This formatting is called "Rich Text".
However, "Rich Text" in Office 2007 and newer is really HTML.

What you are getting looks like the HTML Tags:
<b> BoldText</b>
...will Produce:
    BoldText

FWIW, this is another reason why I am not a huge fan of storing "Formatted" data...
I only format in the final output.

JeffCoachman
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
trbaze,

You seem to be doing quite well as an Expert lately...
;-)

I see that you have been a member since 2007.
Why did you wait so long to started participating regularly as an expert?

In any event, welcome aboard!

Jeff
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Commented:
Mainly because I was a novice at access in 2007 and have greatly increased my skill since then.  Experts exchange has been such a great help to me and I felt it was time to give back and help where I can.  Unfortunaltley because of our harvest season, half of the year I have no time to monitor EE.
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
gdunn59,

Sorry, I did not read your question correctly...
:-(

As for the "Why", it is because this formatting is "stored with" the data.

Again, this is why I don't use this feature often, I only format in the final output.

Again, trbase has posted a great looking solution, so I don't want any points for my "informational posts"

;-)

Jeff

Author

Commented:
Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial