hi there
in a VB program i load Word and a doc file.
i need to know when the loadingprocess is finished!!!!
how i can do this????
Dim objWord As Word.Application
Dim objDocContent As Word.Range
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
objWord.ScreenUpdating = True
sDocName = "c:\temp\test.doc"
objWord.Documents.Open FileName:=sDocName
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! I have to wait until it ist loading complete !!!!!!
!!!!! HOW i know, when the doc is finish loading??? !!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
objWord.ActiveWindow.View.ShowFieldCodes = True
Set objDocContent = objWord.ActiveDocument.Content
With objDocContent.Find
.ClearFormatting
.Replacement.ClearFormatting
.Execute FindText:=mVar.OldLink, _
ReplaceWith:=mVar.NewLink, _
Replace:=wdReplaceAll
End With
With objWord
.ActiveWindow.View.ShowFieldCodes = False
.ActiveDocument.Fields.Update
.ActiveDocument.Close SaveChanges:=wdSaveChanges
End With
thanxs for Help
Roger