Link to home
Start Free TrialLog in
Avatar of gdunn59
gdunn59

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of trbaze
trbaze

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jeffrey Coachman
<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
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
Avatar of trbaze
trbaze

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.
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
Avatar of gdunn59

ASKER

Thanks!