![]() |
#1
|
|||
|
|||
![]()
I wonder how I can replace every word in a document with some texts:
Document: Apple Cat Replace every of them like: Text Text Code:
Sub test() For w = 1 To ActiveDocument.Words.Count ActiveDocument.Words(w).Select ' fail to exclude the space following the selected word If Not Selection.Text Like " *" Then Selection.Text = "Text" End If Next w End Sub Doc: Text Text It moves the second one up to the first paragraph And I'm stuck at how to get rid of the space following the word |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
msword270 | Word | 1 | 01-12-2012 11:41 AM |
Unable to select anything in an MS Word Document | PaulT | Word | 0 | 08-08-2011 07:45 PM |
![]() |
RogerM | Word | 2 | 03-11-2011 01:26 PM |
Force to select a group of word? | jakekei | Word | 0 | 01-21-2010 04:20 PM |
How to write in Word from Select query | lakhan.p | Word | 0 | 03-27-2009 07:25 AM |