Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-12-2018, 11:17 AM
mdbguy mdbguy is offline Format text in Word to look like code in VBA editor Windows 10 Format text in Word to look like code in VBA editor Office 2013
Novice
Format text in Word to look like code in VBA editor
 
Join Date: Oct 2018
Posts: 2
mdbguy is on a distinguished road
Default Format text in Word to look like code in VBA editor

I have miles of Excel VB code written by a long-gone predecessor. It's bad. Needs to be refactored.

I like to copy code into Word so it's easier to manipulate. But I'd like to colorize it like VB code, comments green, keywords blue, that sort of thing. Being unfamiliar with the Word object model, I thought I'd ask for a boost.

I need basic syntax to find all occurrences of a given string and change the color. I think I can handle the rest. Thanks so much!
Reply With Quote
  #2  
Old 10-12-2018, 11:39 AM
mdbguy mdbguy is offline Format text in Word to look like code in VBA editor Windows 10 Format text in Word to look like code in VBA editor Office 2013
Novice
Format text in Word to look like code in VBA editor
 
Join Date: Oct 2018
Posts: 2
mdbguy is on a distinguished road
Default Nevermind

Thanks anyway...I got it.
Reply With Quote
  #3  
Old 10-13-2018, 03:02 AM
slaycock slaycock is offline Format text in Word to look like code in VBA editor Windows 7 64bit Format text in Word to look like code in VBA editor Office 2016
Expert
 
Join Date: Sep 2013
Posts: 256
slaycock is on a distinguished road
Default

If you are trying to refactor VBA code then RubberDuck is a strong ally.

http://rubberduckvba.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Format text in Word to look like code in VBA editor Word MergeField Code Text issue stevenel Mail Merge 17 09-27-2018 09:12 PM
creating a code to create dynamic text in word ah8471 Word VBA 1 12-29-2015 10:52 PM
Macro to select an { includepicture } field code and format the picture behind text and 100% scale sanpedro Word VBA 3 03-30-2015 10:50 PM
Format text in Word to look like code in VBA editor VBA code for Microsoft Word macro — select text and insert footnote ndnd Word VBA 10 01-06-2015 01:47 PM
Format text in Word to look like code in VBA editor VBA code to format a document containing tables rasika99 Word VBA 3 12-12-2014 04:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft