View Single Post
 
Old 08-11-2011, 08:22 AM
GJohansson GJohansson is offline Windows 7 32bit Office 2007
Novice
 
Join Date: Aug 2011
Posts: 17
GJohansson is on a distinguished road
Default Macro to run based on conditions

Quote:
Originally Posted by macropod View Post
Hi Metamag,

Often, when you paste text into Word from web sites, email or PDFs, you'll get a paragraph break at the end of each line within a logical paragraph, and two such breaks between logical paragraphs. Such text stubbornly refuses to honour justification, because there's nothing to justify - it's all a series on one-line paragraphs. You should be able to see this if you have Word configured to display formatting marks on-screen. Clicking the ¶ symbol on the toolbar/home tab toggles this on/off.

You can fix this kind of paragraph formatting using a series of wildcard Find/Replace actions, with:
...

A macro equivalent is:
...
i like to justify text to make a long word document looks good. The problem is that this macro when i run it,
changes the all format of the document. Because delete all break lines between text, even the headers of the text. I would like this makro to run, and delete lines, on the text of a document between two styles that im giving to that macro not all the document. Because in that way, combine together even the heading of the document. Is that such way to do that? Im sending you an word document, that you understand what i want to do. I would like to do the same thing the macro does but only between the styles i said to do, to whole document such as between text of heading 1 and heading 2 or heading 2 and heading 3 because if i choose to do this to a whole document gives me problems such as formating of the style of heading 1 to whole document. You can run this macro to the document to see what exact giving.
Attached Files
File Type: docx This is the initial document.docx (13.7 KB, 28 views)
File Type: docx Final document in format i want to do..docx (13.7 KB, 15 views)

Last edited by macropod; 08-13-2011 at 03:47 AM. Reason: i want to insert attachments word files with examples
Reply With Quote