Hello All,
On Error Resume Next
Set objWord=GetObject(,"Word.Application")
If objWord isNothingThen
Set objword=Createobject("Word.Application")
EndIf
OnErrorGoTo0
objword.Documents.Open
"C:\Test.Docx"
objword.ActiveDocument.Activate
objWord.Selection.TypeText "Hello World-Testing happening here buddy"
objWord.ActiveDocument.save
objWord.ActiveDocument.Close
objWord.Quit
Set objWord=Nothing
Scenario 1:
No Word instances in my task manager,i dint open my document and ran this code-It just add the value i meantioned and save succesfully
Secanrio 2:
I Open my Document and run this code and it hangs-I am running it through UFT-Automation tool.
Kindly Help
Thanks,
Narayan