Jump to content
Macro Express Forums

Retain text formatting with ASCII


Recommended Posts

I've started to incorporate the ASCII functions more frequently when building my macros. I'm wondering whether it is possible to utilize this (or related) function to work with larger blocks of formatted text.

For example, my work periodically sends out excel spreadsheets with standardized texts that they expect us to copy and paste from. What I have always done is pre-program macros with variable set string to contain the corresponding text that I otherwise would have had to copy and paste from the spreadsheet. I am wondering if there is a way for me to have my macros reference a corresponding cell in the spreadsheet and copy the contents of the cell to either the clipboard or a string variable. This way, I would save myself time whenever a new version of the spreadsheet becomes available (which usually have simple changes like paragraph formatting, grammar, etc). 

Link to comment
Share on other sites

You can't access a cell directly in Excel. I stopped using MEP for Excel and use Interop now. It works flawlessly. But there are some tricks you can do whit MEP. One is to use the GoTo function in Excel. You can pop the GoTo and select not only a cell, but a range. So if I want cell C2 I type text [F5], "C2", [Enter]. C2 is selected. Also I can GoTo C2:C5.

Hey, I got a bone to pick with you. How come you never responded to my post where I wrote you that cool application for a text box?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...