Word OLE automation..!!

S

subash jayan

Hi ...


I am using MS Word OLE object for developing one software. But in some
case Word shows some warnings like 'MS Word finished searching...' etc
etc.... Is there any function available to hide the messages or
warnings ???

Thanx in advance...

Subash
 
S

subash jayan

Hi..

In my case i am getting each revision objects from the senetence of
words. But in some strange situations, word doest not returns the
Revision object instead of it shows the message like 'word finished
the searching'...

As ur idea, i have added , i did set Displayalert as false but its
still showing the message....

i am pasting the code here...

Dim oComments As Comments
Dim oComment As Comment
Dim oView As View

Application.DisplayAlerts = wdAlertsNone

Set oComments = ActiveDocument.Comments

lC = oComments.Count

For ind = 1 To oComments.Count
Dim oDoc As Document
Set oComment = oComments.Item(ind)
Dim oRange As Range
Dim oSenRange As Range
Set oRange = oComment.Scope
Set oDoc = oRange.Document

Dim oSens As Sentences
Set oSens = oRange.Sentences

Dim oSenRevisions As Revisions
Set oSenRange = oSens.Item(1) // Here am getting the error and
word shows the message
Set oSenRevisions = oSenRange.Revisions
nRevCnt = oSenRevisions.Count
oDoc.Activate
For ind2 = 1 To nRevCnt
Dim oRev2 As Revision
Set oRev2 = oSenRevisions.Item(ind2)
Next


Next

thanx

subash
 

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