Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4589266
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:02:29+00:00 2026-05-21T22:02:29+00:00

Walk with me for a moment. I have built an Access application to manage

  • 0

Walk with me for a moment.

I have built an Access application to manage data for an internal project at my company. One of the functions of this application is queries the database, then outputs the queries to an Excel spreadsheet, then formats the spreadsheet to spec.

One of the cells of the output is a large amount of text from a Rich Text Memo field in the database. When the rich text is sent to Excel it carries with it HTML tags indicating bold or italic, so for the output I have to add the formatting and remove the tags.

Here is an example of the text I need to format (this text is in a single cell):

For each participant, record 1 effort per lesson delivered

   • Time Spent = # minutes spent on lesson

<strong>OR</strong>
For each participant, record 1 effort per month

   • Time Spent = total # minutes spent on lessons that month

    <strong>Note:</strong> Recording 1 effort per lesson is recommended but not     required
<strong>Note:</strong> Use groups function in ABC when appropriate (see <u>Working With     Groups</u> in ABC document library on the ABC portal)

I have a three neat little recursive functions for formatting the text, here is the bolding function:

Function BoldCharacters(rng As Range, Optional ByVal chrStart As Long)
'This will find all the "<strong></strong>" tags and bold the text in between.
Dim tagL As Integer
tagL = 8
rng.Select

If chrStart = 0 Then chrStart = 1

b1 = InStr(chrStart, ActiveCell.Value, "<strong>") + tagL
    If b1 = tagL Then Exit Function
b2 = InStr(b1, ActiveCell.Value, "</strong>")

ActiveCell.Characters(Start:=b1, Length:=b2 - b1).Font.Bold = True

'Remove the tags
'ActiveCell.Characters(Start:=1, Length:=1).Delete
'ActiveCell.Characters(Start:=b2 - tagL, Length:=tagL + 1).Delete

'Recursion to get all the bolding done in the cell
Call BoldCharacters(ActiveCell, b2 + tagL + 1)

End Function

Now here’s the issue. This formats the text nicely. But the “ActiveCell.Characters.Delete” method fails when I attempt to use it to remove the tags because the cell contains more than 255 characters. So I can’t use the delete method.

And when I do this:

With xlApp.Selection
    .Replace what:="<strong>", replacement:=""

The tags are all removed, but the formatting is all destroyed! So what’s the point!?

I’m looking for a way of formatting my text and removing the tags. I’m considering taking the large bit of text and ‘chunking’ it up into a number of cells, processing the formatting and re-assembling, but that sounds difficult, prone to error, and might not even work.

Any ideas!?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:02:29+00:00Added an answer on May 21, 2026 at 10:02 pm

    You might want to remove the formatting before exporting the data to Excel. At the same time that you remove the formatting, store the formatting information (location, length, style) to a data structure. After you export the “plain text” data you could then iterate over your structure and apply the formatting in Excel. This could be a time consuming process depending upon how many records you plan on exporting at a given time, but it would remove the limitation imposed by Excel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm about to walk into a project that will have files (mostly PHP) behind
I have a list of settings for my application (basically setting which disabled access
I am trying to walk through the functions in Data.List of the Haskell stardard
I have been running this random walk simulation for a while now and I
I have to walk a tree that reaches me from a NodeList, I need
The idea is to walk over multiple dimensions, each one defined as a range
Can someone walk me through how to 'hide' the standard core data setters? I
I've received Mixed responses on this depending what walk-through I read, I've defined a
I am making a platformer. Here is what I have so far: http://megaswf.com/s/2486396 (walk
Can somebody walk me through how this madness works: http://www.youtube.com/watch?v=KL8QLLmUvbg Specifically I'm interested in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.