Jump to content
Macro Express Forums
UAMike

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). 

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×