Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/docs-ref-autogen/word/word/word.document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ properties:
const pagesFirstParagraphText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const paragraphs = page.getRange().paragraphs;
paragraphs.load('items/length');
paragraphs.load("items/length");
pagesNumberOfParagraphs.push(paragraphs);

const firstParagraph = paragraphs.getFirst();
firstParagraph.load('text');
firstParagraph.load("text");
pagesFirstParagraphText.push(firstParagraph);
}

Expand Down
12 changes: 6 additions & 6 deletions docs/docs-ref-autogen/word/word/word.page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ remarks: >-
const pagesText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const range = page.getRange();
range.load('text');
range.load("text");
pagesText.push(range);
}

Expand Down Expand Up @@ -140,11 +140,11 @@ properties:
const pagesText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const range = page.getRange();
range.load('text');
range.load("text");
pagesText.push(range);
}

Expand Down Expand Up @@ -254,11 +254,11 @@ methods:
const pagesText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const range = page.getRange();
range.load('text');
range.load("text");
pagesText.push(range);
}

Expand Down
4 changes: 2 additions & 2 deletions docs/docs-ref-autogen/word/word/word.pagecollection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ remarks: >-
const pagesText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const range = page.getRange();
range.load('text');
range.load("text");
pagesText.push(range);
}

Expand Down
14 changes: 7 additions & 7 deletions docs/docs-ref-autogen/word/word/word.pane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ remarks: >-
const pagesFirstParagraphText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const paragraphs = page.getRange().paragraphs;
paragraphs.load('items/length');
paragraphs.load("items/length");
pagesNumberOfParagraphs.push(paragraphs);

const firstParagraph = paragraphs.getFirst();
firstParagraph.load('text');
firstParagraph.load("text");
pagesFirstParagraphText.push(firstParagraph);
}

Expand Down Expand Up @@ -130,15 +130,15 @@ properties:
const pagesFirstParagraphText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const paragraphs = page.getRange().paragraphs;
paragraphs.load('items/length');
paragraphs.load("items/length");
pagesNumberOfParagraphs.push(paragraphs);

const firstParagraph = paragraphs.getFirst();
firstParagraph.load('text');
firstParagraph.load("text");
pagesFirstParagraphText.push(firstParagraph);
}

Expand Down Expand Up @@ -205,7 +205,7 @@ properties:
const pagesIndexes = [];
for (let i = 0; i < pageCount; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);
}

Expand Down
25 changes: 25 additions & 0 deletions docs/docs-ref-autogen/word/word/word.panecollection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ remarks: >-
\[ [API set: WordApiDesktop
1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]


#### Examples


```TypeScript

// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/get-pages.yaml


await Word.run(async (context) => {
// Gets all the panes in the active document window.

// Get the active window.
const activeWindow: Word.Window = context.document.activeWindow;
activeWindow.load("panes/items/length");

await context.sync();

const panes: Word.PaneCollection = activeWindow.panes;
console.log(`Number of panes in the current document window: ${panes.items.length}`);
});

```

isPreview: false
isDeprecated: false
type: class
Expand Down
8 changes: 4 additions & 4 deletions docs/docs-ref-autogen/word/word/word.window.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ remarks: >-
const pagesFirstParagraphText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const paragraphs = page.getRange().paragraphs;
paragraphs.load('items/length');
paragraphs.load("items/length");
pagesNumberOfParagraphs.push(paragraphs);

const firstParagraph = paragraphs.getFirst();
firstParagraph.load('text');
firstParagraph.load("text");
pagesFirstParagraphText.push(firstParagraph);
}

Expand Down Expand Up @@ -115,7 +115,7 @@ properties:
const pagesIndexes = [];
for (let i = 0; i < pageCount; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);
}

Expand Down
22 changes: 22 additions & 0 deletions docs/docs-ref-autogen/word/word/word.windowcollection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ remarks: >-
\[ [API set: WordApiDesktop
1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]


#### Examples


```TypeScript

// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/get-pages.yaml


await Word.run(async (context) => {
// Gets the document windows.
const windows: Word.WindowCollection = context.document.windows;
windows.load("windows/items/length");

await context.sync();

console.log(`Number of windows for this document: ${windows.items.length}`);
});

```

isPreview: false
isDeprecated: false
type: class
Expand Down
6 changes: 3 additions & 3 deletions docs/docs-ref-autogen/word_desktop_1_2/word/word.document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ properties:
const pagesFirstParagraphText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const paragraphs = page.getRange().paragraphs;
paragraphs.load('items/length');
paragraphs.load("items/length");
pagesNumberOfParagraphs.push(paragraphs);

const firstParagraph = paragraphs.getFirst();
firstParagraph.load('text');
firstParagraph.load("text");
pagesFirstParagraphText.push(firstParagraph);
}

Expand Down
12 changes: 6 additions & 6 deletions docs/docs-ref-autogen/word_desktop_1_2/word/word.page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ remarks: >-
const pagesText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const range = page.getRange();
range.load('text');
range.load("text");
pagesText.push(range);
}

Expand Down Expand Up @@ -125,11 +125,11 @@ properties:
const pagesText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const range = page.getRange();
range.load('text');
range.load("text");
pagesText.push(range);
}

Expand Down Expand Up @@ -239,11 +239,11 @@ methods:
const pagesText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const range = page.getRange();
range.load('text');
range.load("text");
pagesText.push(range);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ remarks: >-
const pagesText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const range = page.getRange();
range.load('text');
range.load("text");
pagesText.push(range);
}

Expand Down
14 changes: 7 additions & 7 deletions docs/docs-ref-autogen/word_desktop_1_2/word/word.pane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ remarks: >-
const pagesFirstParagraphText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const paragraphs = page.getRange().paragraphs;
paragraphs.load('items/length');
paragraphs.load("items/length");
pagesNumberOfParagraphs.push(paragraphs);

const firstParagraph = paragraphs.getFirst();
firstParagraph.load('text');
firstParagraph.load("text");
pagesFirstParagraphText.push(firstParagraph);
}

Expand Down Expand Up @@ -130,15 +130,15 @@ properties:
const pagesFirstParagraphText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const paragraphs = page.getRange().paragraphs;
paragraphs.load('items/length');
paragraphs.load("items/length");
pagesNumberOfParagraphs.push(paragraphs);

const firstParagraph = paragraphs.getFirst();
firstParagraph.load('text');
firstParagraph.load("text");
pagesFirstParagraphText.push(firstParagraph);
}

Expand Down Expand Up @@ -205,7 +205,7 @@ properties:
const pagesIndexes = [];
for (let i = 0; i < pageCount; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ remarks: >-
\[ [API set: WordApiDesktop
1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]


#### Examples


```TypeScript

// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/get-pages.yaml


await Word.run(async (context) => {
// Gets all the panes in the active document window.

// Get the active window.
const activeWindow: Word.Window = context.document.activeWindow;
activeWindow.load("panes/items/length");

await context.sync();

const panes: Word.PaneCollection = activeWindow.panes;
console.log(`Number of panes in the current document window: ${panes.items.length}`);
});

```

isPreview: false
isDeprecated: false
type: class
Expand Down
8 changes: 4 additions & 4 deletions docs/docs-ref-autogen/word_desktop_1_2/word/word.window.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ remarks: >-
const pagesFirstParagraphText = [];
for (let i = 0; i < pages.items.length; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);

const paragraphs = page.getRange().paragraphs;
paragraphs.load('items/length');
paragraphs.load("items/length");
pagesNumberOfParagraphs.push(paragraphs);

const firstParagraph = paragraphs.getFirst();
firstParagraph.load('text');
firstParagraph.load("text");
pagesFirstParagraphText.push(firstParagraph);
}

Expand Down Expand Up @@ -115,7 +115,7 @@ properties:
const pagesIndexes = [];
for (let i = 0; i < pageCount; i++) {
const page = pages.items[i];
page.load('index');
page.load("index");
pagesIndexes.push(page);
}

Expand Down
Loading