Re: Search and switch textorder in Word

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Unfortunately your original message made no mention of Chinese! Had it does
so I would not have attempted to offer a solution. I based my reply on the
string that you quoted. I regret I don't know anything about Chinese nor the
problems you are likely to encounter, but 12 hours to parse 6000 paragraphs
seems somewhat excessive. I guess that the macro is locked into a loop.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Jornebof wrote:
Hi Graham!

Thank you so much for your fast answer!

I tried the replace function that you mentioned but it didn't work.
The text in the (*) section just didn't move. I use Word 2003 is this
a known issue? If i use ([a-z]{1,}) it worked beautifully, but the
problem is that the text I want to move is in chinese. So I tried the
macro you sent me. It worked in a small file. But the file I want to
change text in is a 33MB txt-file and the text is to be replaced
around 6000 times. It has been running for 12 hours now and is still
not finished. Is this normal?

Best regards,
Fredrik

"Graham Mayor" wrote:

Does the line of text containing the fixed text end in a paragraph
mark? In which case the replace function will work Replace
(Fixedtext):(*)(^13)
with
\2\1\3

or with a macro you could use (say)

Dim oPara As Range
Dim sText() As String
For i = 1 To ActiveDocument.Paragraphs.Count
Set oPara = ActiveDocument.Paragraphs(i).Range
oPara.End = oPara.End - 1
If InStr(1, oPara.Text, "Fixedtext:") Then
sText = Split(oPara, ":")
oPara.Text = sText(1) & sText(0)
End If
Next i

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Jornebof wrote:
Hi!
I need to replace the textorder of some lines in a large document,
like this:

Fixedtext:xxx

where Fixedtext is fixed and xxx is any number of any characters
should be switched to look like this

xxxFixedtext

Is there anyone who can help me?
Thank you in advance!!
Fredrik Jornebo


.



Relevant Pages

  • Re: How to make MS Word read out Chinese text?
    ... Don't know about Chinese but see ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ...
    (microsoft.public.word.docmanagement)
  • Re: Writing from English to Chinese (Word 2003)
    ... Word MVP web site http://word.mvps.org ... click on a button and have it translate to Chinese. ...
    (microsoft.public.word.docmanagement)
  • Re: How to remove automatically some pages?
    ... Word MVP web site http://word.mvps.org ... separately without the extra character. ... I used the macro to the big MailMerge output file and it ...
    (microsoft.public.word.newusers)
  • Re: How to remove automatically some pages?
    ... Word MVP web site http://word.mvps.org ... pages using tha macro from you. ... separately without the extra character. ...
    (microsoft.public.word.newusers)
  • Re: How to remove automatically some pages?
    ... Please tell me where is your e-mail address on your web site. ... Word MVP web site http://word.mvps.org ... separately without the extra character. ... After the process of MailMerging I delete the "extra" pages using the macro from ...
    (microsoft.public.word.newusers)