Working with Word document and identifying the last line
Thanks for all your suggestions for my previous query. I have a new query, request you to help on this. Currently i am planning to create a report in word file, where i can add text and also screenshot for detailing. I have found way to add text and also to add screenshot to word. But when the log gets added, text is getting placed in same line and in sameway screenshots are also placed over the same line. So everything falls in a cluster.
Please help me to know how to add text and screenshot in next line to the previous line. I tried to activate the document and give keyboard action using Sys.Keys("[Enter]"), which dint work out. Also there are very less content regarding working with word, so i got stuck here.
Solved! Go to Solution.
Could you tell us how you access Word and more information on the work already done ?
Did u follow the TC sample:
<TestComplete 14 Samples>\Common\MSOffice\JScript\Word_JScript
Un sourire et ça repart
As @BenoitB said before. An example You can see these lines of code:
// Makes the title SelectFont("Arial", 24, wdBlue, true, false); MsWord.Selection.InsertAfter("TestComplete Report"); Doc.Paragraphs.Add(); MsWord.Selection.MoveDown(wdParagraph, 1);
Based on this example you will achieve the desired result.
Thanks for the suggestions, guys!
@Saira16, was the issue resolved? Please let us know if you need any more assistance.
SmartBear Community and Education Manager
Thanks for your suggestion, i will also try to use this. Currently i have tried the solution provided above by BenoitB. I will also try your suggestion.