Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-13-2014, 08:28 PM
bnyamin bnyamin is offline find a code and create outline Windows 7 64bit find a code and create outline Office 2010 64bit
Advanced Beginner
find a code and create outline
 
Join Date: Oct 2014
Posts: 36
bnyamin is on a distinguished road
Question find a code and create outline

hello
i have tree code for example A,B and C
i need a vba code , for find this codes and after than create outline with different level .
code A level 1
code B level 2


and code C level 3
with no change in color font
thanks
Attached Files
File Type: doc befor.doc (23.5 KB, 10 views)
File Type: doc after run code (2).doc (27.0 KB, 11 views)
Reply With Quote
  #2  
Old 10-14-2014, 02:51 AM
macropod's Avatar
macropod macropod is offline find a code and create outline Windows 7 64bit find a code and create outline Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You don't need VBA for this. All you need do is define paragraph Styles that meet your requirements, then use Find/Replace to apply those Styles to the paragraphs concerned.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 10-20-2014, 08:55 PM
bnyamin bnyamin is offline find a code and create outline Windows 7 64bit find a code and create outline Office 2010 64bit
Advanced Beginner
find a code and create outline
 
Join Date: Oct 2014
Posts: 36
bnyamin is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
You don't need VBA for this. All you need do is define paragraph Styles that meet your requirements, then use Find/Replace to apply those Styles to the paragraphs concerned.
please describe for me or education , with jpg .
Styles , don't create a outline ...
Reply With Quote
  #4  
Old 10-20-2014, 11:56 PM
macropod's Avatar
macropod macropod is offline find a code and create outline Windows 7 64bit find a code and create outline Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

First, you need to learn how to use Styles. They are at the heart of the way Word works. Every paragraph in a document has one of the available paragraph Styles. See:
http://office.microsoft.com/en-au/wo...010230882.aspx
http://office.microsoft.com/en-au/wo...005240626.aspx
http://shaunakelly.com/word/styles/stylesms.html
http://www.addbalance.com/usersguide/styles.htm

Once you've defined the Heading Styles the way you want them, it's just a matter of using Find/Replace to look for paragraphs beginning with 'A - ' and 'B - ' and replacing them with the requisite Heading Styles. See, for example:
http://office.microsoft.com/en-us/wo...005189433.aspx
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
find a code and create outline Help with VBA code to find and highlight text mpdsal Word VBA 8 09-11-2014 03:55 PM
find a code and create outline Can't search (Find) because of Format: Outline Willie Word 2 06-05-2013 12:10 PM
Macro code should find inv no in folder and send attachhed mail. visha_1984 Outlook 0 01-30-2013 05:08 AM
find a code and create outline Code to Create & Format Document Sections sleake Word 6 04-26-2012 04:14 AM
Writing code with C# and VB.NET to create Outlook add-ins and other projects kistou Outlook 0 01-13-2010 04:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:33 AM.


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