
replace method of MS-Word 2000 automation object introduces a new line
thanks for the reply.However the Application..ScreenRefresh
is not working.Can u suggest some other work around
regards
R.Ranjan
Quote:
>-----Original Message-----
>Hi Ranjan,
>First, have a look at the MS Word MVP site
>(http://www.mvps.org/word/FindHelp/Posting.htm) for
ettiquette using the
Quote:
>newsgroups, especially number 6.
><quote>
>Don't include attachments. They very rarely add anything
to the description
>of the problem. Many people who regularly answer
questions have their
Quote:
>systems set to automatically reject all messages
containing attachments, so
Quote:
>they will never even see your question. Word documents
and templates are
>usually unwelcome, because of the risk that they carry
macro viruses.
>Screenshots are unwelcome because they are so big,
compared to the amount of
Quote:
>information they hold. If you have an error message,
*don't* post a
>screenshot, just note down the text, and type it into
your message. Some
>error dialogs allow you to copy and paste the error
message text. If they
Quote:
>have spent some time dealing with your problem, somebody
may suggest that
>you email a file to them. Alternatively, you could make
the file available
>on the web somewhere and include a link to it in your
message, so that
>anybody who is interested can take a look.
><unquote>
>About your question, no, I don't suspect that it's a big
problem. You might
>try
>Application.ScreenRefresh
>to see if you can force Word to update the display so
that it doesn't show
Quote:
>the table being pushed to the second page.
>HTH
>> hi ,
>> We are facing problems in using the find and replace
>> automation object in MS-Word 2000.The problem is as
>> follows.
>> In our application find and replace method is used to
>> replace a string in the header and footer . The sample
>> document does not contain a header. But it contains a
>> table in the first page. After executing the find and
>> replace method the bottom of the table is broken and
>> pushed to the second page. Thereby a single page
document
>> is now made as two-page document. But when u visit the
>> header and return to body the document changes to single
>> page. Please confirm whether this is a issue.
>> The following is the code
>> With Application.ActiveDocument.Sections.Item
>> (1).Headers.Item(1).Range.Find
>> .ClearFormatting
>> .Text = "What"
>> .Replacement.ClearFormatting
>> .Replacement.Text = "hello"
>> .Execute Replace:=wdReplaceAll, Forward:=True, _
>> Wrap:=wdFindContinue
>> End With
>> Please refer the attachment for the sample document.
>.