Find and Replace crash when installing Office Security Patch kb830349

M

Manish Katiyar

Hi,
I am doing Find and Replace in MS Word from VB Code.
It was working fine till I installed Office Patch(kb 830349).
There is a piece of code in which I am doing find and replace in my
document, actually replacing some text in the document with a link
object.
The code is as follows

'----------------------------------------------------------
Set objRange = letter.Content
With objRange.Find
.ClearFormatting
If Not .Execute(FindText:="[BodyText]") Then
Set objRange = Nothing
End If
End With

letter.Fields.Add Range:=objRange, Type:=wdFieldLink,
Text:="Word.Document.8 ""c:\\Socrates\\Templates\\Temp\\RTFTemp.rtf""
\a \r"
Set objRange = Nothing
'----------------------------------------------------------

This piece of code was working fine before the update was installed.

After the update install, it gives an error after line:
..ClearFormatting
"Class does not support Automation or does not support expected
interface".

After clicking OK, Memory read error occurs and the application
terminates and if I am running from VB, then it also closes.

Any solution for this will be greatly appreciated

Thanks in advance,
Manish Katiyar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top