Forum Discussion

Mike9's avatar
Mike9
Occasional Contributor
3 years ago

How to get all js methods/functions that could be used while working with Microsoft Office

Hello everyone,

There is an example of working with Microsoft Office products like Word, Excel, etc.

In this example (js), we can see some methods to work with Selection, Paragraphs, etc like:

 

 

MsWord = Sys.OleObject("Word.Application");
MsWord.Visible = true;
Doc = MsWord.Documents.Add();
MsWord.Selection.InsertAfter("TestComplete Report");
Doc.Paragraphs.Add();
MsWord.Selection.MoveDown(wdParagraph, 1);

 

 

The question is where I can find the whole list of classes(if it's classes, like "Documents", "Paragraphs", etc) / methods(like "InsertAfter", "MoveDown", etc) for interacting with Microsoft Office apps?

Will appreciate any info 🙂

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    I found quite a few examples in Microsoft documentation with a Google search using your sample code.  Try looking there. 

     

     

    • Mike9's avatar
      Mike9
      Occasional Contributor

      Mostly of examples from the Google search related to VBA, but I provided examples for js and asked about the list of supported objects/methods exactly for js. Also looks like it is some kind of native TestComplete objects/methods, that's why I was confused when recognized that there is no info about it on the SmartBear website.