Automatic-Subscript in Word

orangepeel

New Member
Joined
Apr 16, 2004
Messages
16
When it comes to writing chemical formulae, it is such a drag having to highlight each individual number and press the subscript button. It is not so bad for the occasional H2O, but for something like [(C4H9)4N]2Mo8O26 this task becomes a real pain! A program called ChemDraw has a button which, when selected, causes all highlighted numbers (and not highlighted letters) to be automatically made into subscript. Such a button would make my relationship with Word a great deal sweeter. Could this be achieved with a macro? Has anyone written the code, or found an alternative solution?

Many thanks.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Search hasn't thrown up anything of much use. Certainly, the word 'Subscript' only throws up this thread when I limit the search to this board. Could it have been the following thread that you were thinking of?:

http://www.mrexcel.com/board2/viewtopic.php?t=87149&highlight=subscript+word+macro

If anyone has any more success than me in finding the relevent string, then I'd be glad to hear about it. Otherwise, any further help would be much appreciated. I am sure it would be a simple macro to write, if you knew how.
 
Upvote 0
I also found this macro:

http://www.geocities.com/Athens/Thebes/5118/download.htm

It is pretty exhaustive in what it does for you. Unfortunately, I can't get it to work. Perhaps becuase I run Office X on a mac. Still, the debugger stalls with the following message on the very first line of code:

Compile error: 'Type-declaration character does not match declared data type.'

I don't think that is a windows/mac compatibility issue. Has anyone else used this macro successfully? I just wish I knew enough code to fix it.

:cry:
 
Upvote 0
Macs.. I charge extra for mac issues :-P

can you post the line ? I rather not install it....
 
Upvote 0

Forum statistics

Threads
1,224,836
Messages
6,181,251
Members
453,027
Latest member
Lost_in_spreadsheets

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top