Does anyone have a simple macro that will change the first space in each paragraph to a tab? Greatly appreciate some help with this.
Does anyone have a simple macro that will change the first space in each paragraph to a tab? Greatly appreciate some help with this.
Find and Replace will do this. Search for ^p[space], replace with ^p^t.
Thanks, Jezebel, but this will only work if the first character of each paragraph is a space. I have no way of knowing how many characters occur before the first space in each paragraph.
Sorry, I assumed you meant leading space. For the cases where there are intervening characters, check the 'Use wildcards' checkbox and use Search for: (^013[! ]{1,})[space] Replace with: \1^009
Thanks, Jezebel, but I'm still having trouble, probably because I have little undertanding of the symbols used. With 'Use wildcards' checked and ignoring the asterisks, I've tried these combinations for find, but none of them works: *(^013[! ]{1,})[space]* *(^013[! ]{1,})[ ]* *(^013[! ]{1,}) *
[space] just means a single space, no brackets, so your third option looks right. What it all means: ^013 is a paragraph mark [! ] means "not space" {1,} means one or more of the preceding matching -- in this case [! ]{1,} means one or more non-spaces Tbe brackets are for grouping, to match up with the \1 in the replace string. So all combined, what you're searching for is "paragraph mark followed by one or more non-spaces followed by a space". You're replacing with "whatever was matched by the contents of the brackets, plus a tab" I tested it -- it does work.
Thanks again , Jezebel. Slowly getting there. Seems like I have a problem within a problem. I believe the reason nothing was happening was because I was using the Czech version of Word. Let's leave that aside for a moment. When I use the American version of Word, the Find works, but not as I want it to. The wild card expression selects a paragraph mark and the text in the next line up to and including the first space. I'm trying to find the first space in each line. Example: abc def ghi a bcd fgh i ab cdfg hi line 1, needs selection of the space between c and d line 2, needs selection of the space between a and b line 3, needs selection of the space between b and c I tried reading the help on wild cards, but it was beyond me. Really needs an expert.
The method Jezebel provide will work for all paragraphs except paragraph 1. That one you will need to do manually. If it isn't working, then the units that you are called paragraphs (i.e., lines) are not in fact individual paragraphs.
Yes, it finds the paragraph mark. That's OK: it's just another character, and it gets replaced.
Brian Holfield was telling us: Brian Holfield nous racontait que : Replace the "," by a ";" The semi-colon is probably the list delimiter in Czech, as it is in many European version of Windows. -- Salut! _______________________________________ Jean-Guy Marcil - Word MVP XXXX@XXXXX.COM Word MVP site: http://www.**--****.com/
Oops! Yes, It works. I shot myself in the foot by not understanding the code and going step by step. When I saw so much selected by the find my reaction was: Whoa, I don't want to replace all that with a tab. But, now I see that the replace code takes care of that nicely. Thanks for being so patient with me, Jezebel, and thanks for solving a problem that was holding me up.
Yes, it works nicely, Greg. My paragraphs were OK, it was my mental attitude that tripped me up - see reply to Jezebel
Thanks for the suggestion, Jean-Guy. That's probably the right direction, but it needs something in addition to changing , to ;.
1.Programmatic change first space in each paragraph to a tab
abc def ghi a bcd fgh i ab cdfg hi line 1, needs a tab instead of the space between c and d line 2, needs a tab instead of the space between a and b line 3, needs a tab instead of the space between b and c Currently this is being done with a search and replace, using wildcards: Search for: (^013[! ]{1,})[space] Replace with: \1^009 Is it possible to achieve the same result using a macro? Since a number of people have to make this change, it would be easier to have them run FirstSpaceToTab than to train them to use this tricky Search and Replace. Thanks for any help.
2.Tab changes in my second paragraph are changing tabs in my first
When I change a tab in my second paragraph it makes the same change in my first paragraph. Why and how do I change this? I've taken off almost all the autoformatting. This is exceedingly annoying and I can't imagine why Word would do this.
3.Tab changes in my second paragraph are changing tabs in my fir
Carol, I don't think so. I searched around and took off all the auto update things that I could see. I liked Word better before it tried so hard to read my mind. It's not very good at it. "Carol" wrote: > Are you using styles? Perhaps you have updating styles. > -- > Carol A. Bratt, MCP > > > > "PrairiePaintbrush" wrote: > > > When I change a tab in my second paragraph it makes the same change in my > > first paragraph. Why and how do I change this? I've taken off almost all > > the autoformatting. This is exceedingly annoying and I can't imagine why > > Word would do this.
4.Changing default tabs in one paragraph changes all tabs
In a large Word 2003 document, I'm trying to change the default tabs for one paragraph, or a selection of paragraphs, by selecting them, then going to Format: Tabs: Default Tab stops and changing them from .25" to .5". The result is that the tabs in the entire document change from .25" to .5". I haven't noticed this behaviour before. Is there some other formatting that could interfere with the tab setting change? Is there any other way to change the tabs besides manually entering tabs for paragraphs in which I don't want to use the default tabs?
5.Using hanging indent on paragraph where first line contains tab
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Is there any way to put a hanging indent of more than one tab stop on a paragraph where the first line is indented using a tab? I thought I'd figured out how to do it in Word 2004, but maybe not. What I'd like to have is something like the following, hopefully this shows up correctly when the HTML formats this message: Heading Vocabulary: definition definition definition definition definition definition definition definition blah blah Where I'd like subsequent lines of the definition to begin aligned with the first word of the definition that follows the vocabulary word. You may wonder why I don't just use an indent for the start of the vocab word paragraph. The reason is I'm using some paragraph border formatting which indents itself when the paragraph is indented, and I want all the paragraph borders in the same spot on the left. Any ideas?
6. No Space Before first paragraph Word 2007
7. Printing Paragraph, Tab and Space Marks
8. How do I change the default paragraph indent when first opening Wo
Users browsing this forum: No registered users and 19 guest