Working with Word document and identifying the last line
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Working with Word document and identifying the last line
Dear All
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.
Thanks
Saira
Solved! Go to Solution.
- Labels:
-
Test Results
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the suggestions, guys!
@Saira16, was the issue resolved? Please let us know if you need any more assistance.
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for late reply, i tried with link you shared and got what i wanted. Thanks for your help.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, by trying out one of the method as suggested above in the link i was able to move forward. Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
