Copy the formatted text from a table cell

Posted on 2001-06-21
Last Modified: 2010-05-02
I can put unformatted text into an array member, but the moment I put in superscripting and subscripting, the array destroys (or something destroys) the special formatting of characters. I am working with Visual Basic as found in Word 97.

Can someone please tell me how to preserve the formatting while putting all the text in an array. Thank you so very much.
Question by:jcherry_99
  • 5
  • 2
LVL 16

Expert Comment

ID: 6215623
What is the type of array?

Author Comment

ID: 6215762
Dear Richie:

I suspect that that is the key to the problem I am having.
I have not declared the array type but if I understand it correctly, it defaults to variant. I am a beginner and so do a lot of cutting and pasting from other people's code.

Anyway it is just ordinary text that has some formatting (superscripts and subscripts). How should I declare it?

To reinterate, I want to take formatted text in a cell and put that into an array. The array contents will be printed out later.

LVL 16

Expert Comment

ID: 6216256
did you try to declare as Byte?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 16

Expert Comment

ID: 6216264
There is another question, where do you paste/put/whatever the contents of array?

Author Comment

ID: 6217016
I'm putting it on the same page, just further down. What to do once I have the array is not the problem.

Why byte?

I have a simpler problem. How do you select the beginng contents of a cell (and not the cell itself) without geting the framing of the cell box.
LVL 16

Accepted Solution

Richie_Simonetti earned 50 total points
ID: 6218147
Well, i do not understand your question completely.
Try with pastespecial function and paste format too.
LVL 16

Expert Comment

ID: 7138968
No more help after an "B" grade, sorry. :)

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

756 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