How many of you guys ever thought of creating a MS doc file with the help of QTP. It is in fact quite simple to create one. Let me show you a sample script of creating a very simple document in MS Word.
Set obj_MSWord = CreateObject("Word.Application")
obj_MSWord.Documents.Add
obj_MSWord.Selection.TypeText "This is a simple text"
obj_MSWord.ActiveDocument.SaveAs "D:\Expert.doc"
obj_MSWord.Quit
Think of this scenario . Lets say I have already opened MS Word document. Now I want to save it into my PC. The script is slightly different from the one shown above.Any idea what should be the code??
1 comment:
You are doing a great job ExpertQTP but no idea regarding your assignment.
Ankit
Post a Comment