Last active
August 14, 2023 08:11
-
-
Save aspose-words-cloud-gists/a9510e4b51613f1138e7c1ec09634c4a to your computer and use it in GitHub Desktop.
This gist exceeds the recommended number of files (~10).
To access all files, please clone this gist.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist contains Node.js code samples for Aspose.Words Cloud API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const acceptRequest = new model.AcceptAllRevisionsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.acceptAllRevisions(acceptRequest) | |
.then((acceptRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of acceptRequest: ", acceptRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const acceptRequest = new model.AcceptAllRevisionsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.acceptAllRevisionsOnline(acceptRequest) | |
.then((acceptRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of acceptRequest: ", acceptRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const remoteFileName = "Sample.docx"; | |
const requestDocumentListDocumentEntries0FileReference = model.FileReference.fromRemoteFilePath(remoteFileName); | |
const requestDocumentListDocumentEntries0 = new model.DocumentEntry({ | |
fileReference: requestDocumentListDocumentEntries0FileReference, | |
importFormatMode: "KeepSourceFormatting" | |
}) | |
const requestDocumentListDocumentEntries = [ | |
requestDocumentListDocumentEntries0 | |
] | |
const requestDocumentList = new model.DocumentEntryList({ | |
documentEntries: requestDocumentListDocumentEntries | |
}) | |
const appendRequest = new model.AppendDocumentRequest({ | |
name: remoteFileName, | |
documentList: requestDocumentList | |
}); | |
wordsApi.appendDocument(appendRequest) | |
.then((appendRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of appendRequest: ", appendRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const localFile = "Sample.docx"; | |
const requestDocument = fs.createReadStream(localFile); | |
const requestDocumentListDocumentEntries0FileReferenceStream = fs.createReadStream(BaseTest.localBaseTestDataFolder + localFile); | |
const requestDocumentListDocumentEntries0FileReference = model.FileReference.fromLocalFileContent(requestDocumentListDocumentEntries0FileReferenceStream); | |
const requestDocumentListDocumentEntries0 = new model.DocumentEntry({ | |
fileReference: requestDocumentListDocumentEntries0FileReference, | |
importFormatMode: "KeepSourceFormatting" | |
}) | |
const requestDocumentListDocumentEntries = [ | |
requestDocumentListDocumentEntries0 | |
] | |
const requestDocumentList = new model.DocumentEntryList({ | |
documentEntries: requestDocumentListDocumentEntries | |
}) | |
const appendRequest = new model.AppendDocumentOnlineRequest({ | |
document: requestDocument, | |
documentList: requestDocumentList | |
}); | |
wordsApi.appendDocumentOnline(appendRequest) | |
.then((appendRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of appendRequest: ", appendRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestStyleApply = new model.StyleApply({ | |
styleName: "Heading 1" | |
}) | |
const applyStyleRequest = new model.ApplyStyleToDocumentElementRequest({ | |
name: "Sample.docx", | |
styleApply: requestStyleApply, | |
styledNodePath: "paragraphs/1/paragraphFormat" | |
}); | |
wordsApi.applyStyleToDocumentElement(applyStyleRequest) | |
.then((applyStyleRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of applyStyleRequest: ", applyStyleRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestStyleApply = new model.StyleApply({ | |
styleName: "Heading 1" | |
}) | |
const applyStyleRequest = new model.ApplyStyleToDocumentElementOnlineRequest({ | |
document: requestDocument, | |
styleApply: requestStyleApply, | |
styledNodePath: "paragraphs/1/paragraphFormat" | |
}); | |
wordsApi.applyStyleToDocumentElementOnline(applyStyleRequest) | |
.then((applyStyleRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of applyStyleRequest: ", applyStyleRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestReportEngineSettingsReportBuildOptions = [ | |
model.ReportBuildOptions.AllowMissingMembers, | |
model.ReportBuildOptions.RemoveEmptyParagraphs | |
] | |
const requestReportEngineSettings = new model.ReportEngineSettings({ | |
dataSourceType: model.ReportEngineSettings.DataSourceTypeEnum.Json, | |
reportBuildOptions: requestReportEngineSettingsReportBuildOptions | |
}) | |
const buildReportRequest = new model.BuildReportRequest({ | |
name: "Sample.docx", | |
data: "Data.json", | |
reportEngineSettings: requestReportEngineSettings | |
}); | |
wordsApi.buildReport(buildReportRequest) | |
.then((buildReportRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of buildReportRequest: ", buildReportRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestTemplate = fs.createReadStream("Sample.docx"); | |
const requestReportEngineSettings = new model.ReportEngineSettings({ | |
dataSourceType: model.ReportEngineSettings.DataSourceTypeEnum.Json, | |
dataSourceName: "persons" | |
}) | |
const buildReportRequest = new model.BuildReportOnlineRequest({ | |
template: requestTemplate, | |
data: "Data.json", | |
reportEngineSettings: requestReportEngineSettings | |
}); | |
wordsApi.buildReportOnline(buildReportRequest) | |
.then((buildReportRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of buildReportRequest: ", buildReportRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const classifyRequest = new model.ClassifyRequest({ | |
text: "Try text classification", | |
bestClassesCount: "3" | |
}); | |
wordsApi.classify(classifyRequest) | |
.then((classifyRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of classifyRequest: ", classifyRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const classifyRequest = new model.ClassifyDocumentRequest({ | |
name: "Sample.docx", | |
bestClassesCount: "3" | |
}); | |
wordsApi.classifyDocument(classifyRequest) | |
.then((classifyRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of classifyRequest: ", classifyRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const classifyRequest = new model.ClassifyDocumentOnlineRequest({ | |
document: requestDocument, | |
bestClassesCount: "3" | |
}); | |
wordsApi.classifyDocumentOnline(classifyRequest) | |
.then((classifyRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of classifyRequest: ", classifyRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestCompareData = new model.CompareData({ | |
author: "author", | |
comparingWithDocument: "TestCompareDocument2.doc", | |
dateTime: new Date('2015-10-26T00:00:00Z') | |
}) | |
const compareRequest = new model.CompareDocumentRequest({ | |
name: "TestCompareDocument1.doc", | |
compareData: requestCompareData, | |
destFileName: "CompareDocumentOut.doc" | |
}); | |
wordsApi.compareDocument(compareRequest) | |
.then((compareRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of compareRequest: ", compareRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("compareTestDoc1.doc"); | |
const requestCompareData = new model.CompareData({ | |
author: "author", | |
comparingWithDocument: "TestCompareDocument2.doc", | |
dateTime: new Date('2015-10-26T00:00:00Z') | |
}) | |
const requestComparingDocument = fs.createReadStream("compareTestDoc2.doc"); | |
const compareRequest = new model.CompareDocumentOnlineRequest({ | |
document: requestDocument, | |
compareData: requestCompareData, | |
comparingDocument: requestComparingDocument, | |
destFileName: "CompareDocumentOut.doc" | |
}); | |
wordsApi.compareDocumentOnline(compareRequest) | |
.then((compareRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of compareRequest: ", compareRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestCompressOptions = new model.CompressOptions({ | |
}) | |
const compressDocument = new model.CompressDocumentRequest({ | |
name: "Sample.docx", | |
compressOptions: requestCompressOptions | |
}); | |
wordsApi.compressDocument(compressDocument) | |
.then((compressDocumentResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of CompressDocument: ", compressDocumentResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("TestCompress.docx"); | |
const requestCompressOptions = new model.CompressOptions({ | |
}) | |
const compressDocumentOnline = new model.CompressDocumentOnlineRequest({ | |
document: requestDocument, | |
compressOptions: requestCompressOptions | |
}); | |
wordsApi.compressDocumentOnline(compressDocumentOnline) | |
.then((compressDocumentOnlineResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of CompressDocumentOnline: ", compressDocumentOnlineResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const convertRequest = new model.ConvertDocumentRequest({ | |
document: requestDocument, | |
format: "pdf" | |
}); | |
wordsApi.convertDocument(convertRequest) | |
.then((convertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of convertRequest: ", convertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const convertRequest = new model.ConvertDocumentRequest({ | |
document: requestDocument, | |
format: "pdf" | |
}); | |
wordsApi.convertDocument(convertRequest) | |
.then((convertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of convertRequest: ", convertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const convertRequest = new model.ConvertDocumentRequest({ | |
document: requestDocument, | |
format: "pdf" | |
}); | |
wordsApi.convertDocument(convertRequest) | |
.then((convertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of convertRequest: ", convertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const copyRequest = new model.CopyFileRequest({ | |
destPath: "Copy.docx", | |
srcPath: "Sample.docx" | |
}); | |
wordsApi.copyFile(copyRequest) | |
.then((copyRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of copyRequest: ", copyRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const folderToCopy = "/TestCopyFolder"; | |
const copyRequest = new model.CopyFolderRequest({ | |
destPath: folderToCopy + "Dest", | |
srcPath: folderToCopy + "Src" | |
}); | |
wordsApi.copyFolder(copyRequest) | |
.then((copyRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of copyRequest: ", copyRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestStyleCopy = new model.StyleCopy({ | |
styleName: "Heading 1" | |
}) | |
const copyRequest = new model.CopyStyleRequest({ | |
name: "Sample.docx", | |
styleCopy: requestStyleCopy | |
}); | |
wordsApi.copyStyle(copyRequest) | |
.then((copyRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of copyRequest: ", copyRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestStyleCopy = new model.StyleCopy({ | |
styleName: "Heading 1" | |
}) | |
const copyRequest = new model.CopyStyleOnlineRequest({ | |
document: requestDocument, | |
styleCopy: requestStyleCopy | |
}); | |
wordsApi.copyStyleOnline(copyRequest) | |
.then((copyRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of copyRequest: ", copyRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const copyRequest = new model.CopyStylesFromTemplateRequest({ | |
name: "Sample.docx", | |
templateName: "StyleTemplate.docx" | |
}); | |
wordsApi.copyStylesFromTemplate(copyRequest) | |
.then((copyRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of copyRequest: ", copyRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const createRequest = new model.CreateDocumentRequest({ | |
fileName: "Sample.docx" | |
}); | |
wordsApi.createDocument(createRequest) | |
.then((createRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of createRequest: ", createRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const createRequest = new model.CreateFolderRequest({ | |
path: "/TestCreateFolder" | |
}); | |
wordsApi.createFolder(createRequest) | |
.then((createRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of createRequest: ", createRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestProperty = new model.DocumentPropertyCreateOrUpdate({ | |
value: "John Doe" | |
}) | |
const createRequest = new model.CreateOrUpdateDocumentPropertyRequest({ | |
name: "Sample.docx", | |
propertyName: "AsposeAuthor", | |
property: requestProperty | |
}); | |
wordsApi.createOrUpdateDocumentProperty(createRequest) | |
.then((createRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of createRequest: ", createRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestProperty = new model.DocumentPropertyCreateOrUpdate({ | |
value: "John Doe" | |
}) | |
const createRequest = new model.CreateOrUpdateDocumentPropertyOnlineRequest({ | |
document: requestDocument, | |
propertyName: "AsposeAuthor", | |
property: requestProperty | |
}); | |
wordsApi.createOrUpdateDocumentPropertyOnline(createRequest) | |
.then((createRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of createRequest: ", createRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteAllParagraphTabStopsRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.deleteAllParagraphTabStops(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteAllParagraphTabStopsOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.deleteAllParagraphTabStopsOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteBookmarkRequest({ | |
name: "Sample.docx", | |
bookmarkName: "aspose" | |
}); | |
wordsApi.deleteBookmark(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteBookmarkOnlineRequest({ | |
document: requestDocument, | |
bookmarkName: "aspose" | |
}); | |
wordsApi.deleteBookmarkOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteBookmarksRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.deleteBookmarks(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteBookmarksOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.deleteBookmarksOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteBorderRequest({ | |
name: "Sample.docx", | |
borderType: "left", | |
nodePath: "tables/1/rows/0/cells/0" | |
}); | |
wordsApi.deleteBorder(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteBorderOnlineRequest({ | |
document: requestDocument, | |
borderType: "left", | |
nodePath: "tables/1/rows/0/cells/0" | |
}); | |
wordsApi.deleteBorderOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteBordersRequest({ | |
name: "Sample.docx", | |
nodePath: "tables/1/rows/0/cells/0" | |
}); | |
wordsApi.deleteBorders(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteBordersOnlineRequest({ | |
document: requestDocument, | |
nodePath: "tables/1/rows/0/cells/0" | |
}); | |
wordsApi.deleteBordersOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteCommentRequest({ | |
name: "Sample.docx", | |
commentIndex: 0 | |
}); | |
wordsApi.deleteComment(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteCommentOnlineRequest({ | |
document: requestDocument, | |
commentIndex: 0 | |
}); | |
wordsApi.deleteCommentOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteCommentsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.deleteComments(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteCommentsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.deleteCommentsOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteCustomXmlPartRequest({ | |
name: "Sample.docx", | |
customXmlPartIndex: 0 | |
}); | |
wordsApi.deleteCustomXmlPart(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteCustomXmlPartOnlineRequest({ | |
document: requestDocument, | |
customXmlPartIndex: 0 | |
}); | |
wordsApi.deleteCustomXmlPartOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteCustomXmlPartsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.deleteCustomXmlParts(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteCustomXmlPartsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.deleteCustomXmlPartsOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteDocumentPropertyRequest({ | |
name: "Sample.docx", | |
propertyName: "testProp" | |
}); | |
wordsApi.deleteDocumentProperty(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteDocumentPropertyOnlineRequest({ | |
document: requestDocument, | |
propertyName: "testProp" | |
}); | |
wordsApi.deleteDocumentPropertyOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteDrawingObjectRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.deleteDrawingObject(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteDrawingObjectOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.deleteDrawingObjectOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteFieldRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.deleteField(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteFieldOnlineRequest({ | |
document: requestDocument, | |
index: 0, | |
nodePath: "sections/0/paragraphs/0" | |
}); | |
wordsApi.deleteFieldOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteFieldsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.deleteFields(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteFieldsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.deleteFieldsOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteFileRequest({ | |
path: "Sample.docx" | |
}); | |
wordsApi.deleteFile(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteFolderRequest({ | |
path: "" | |
}); | |
wordsApi.deleteFolder(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteFootnoteRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.deleteFootnote(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const deleteRequest = new model.DeleteFootnoteOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.deleteFootnoteOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteFormFieldRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.deleteFormField(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteFormFieldOnlineRequest({ | |
document: requestDocument, | |
index: 0, | |
nodePath: "sections/0" | |
}); | |
wordsApi.deleteFormFieldOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteMacrosRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.deleteMacros(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteMacrosOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.deleteMacrosOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteOfficeMathObjectRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.deleteOfficeMathObject(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteOfficeMathObjectOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.deleteOfficeMathObjectOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteParagraphRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.deleteParagraph(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteParagraphListFormatRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.deleteParagraphListFormat(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const deleteRequest = new model.DeleteParagraphListFormatOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.deleteParagraphListFormatOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteParagraphOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.deleteParagraphOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteParagraphTabStopRequest({ | |
name: "Sample.docx", | |
position: 72.0, | |
index: 0 | |
}); | |
wordsApi.deleteParagraphTabStop(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteParagraphTabStopOnlineRequest({ | |
document: requestDocument, | |
position: 72.0, | |
index: 0 | |
}); | |
wordsApi.deleteParagraphTabStopOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteRunRequest({ | |
name: "Sample.docx", | |
paragraphPath: "paragraphs/1", | |
index: 0 | |
}); | |
wordsApi.deleteRun(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const deleteRequest = new model.DeleteRunOnlineRequest({ | |
document: requestDocument, | |
paragraphPath: "paragraphs/1", | |
index: 0 | |
}); | |
wordsApi.deleteRunOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteSectionRequest({ | |
name: "Sample.docx", | |
sectionIndex: 0 | |
}); | |
wordsApi.deleteSection(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteSectionOnlineRequest({ | |
document: requestDocument, | |
sectionIndex: 0 | |
}); | |
wordsApi.deleteSectionOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteStructuredDocumentTagRequest({ | |
name: "Sample.docx", | |
index: 0, | |
nodePath: "sections/0/body/paragraphs/0" | |
}); | |
wordsApi.deleteStructuredDocumentTag(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteStructuredDocumentTagOnlineRequest({ | |
document: requestDocument, | |
index: 0, | |
nodePath: "sections/0/body/paragraphs/0" | |
}); | |
wordsApi.deleteStructuredDocumentTagOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteTableRequest({ | |
name: "Sample.docx", | |
index: 1 | |
}); | |
wordsApi.deleteTable(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteTableCellRequest({ | |
name: "Sample.docx", | |
tableRowPath: "sections/0/tables/2/rows/0", | |
index: 0 | |
}); | |
wordsApi.deleteTableCell(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteTableCellOnlineRequest({ | |
document: requestDocument, | |
tableRowPath: "sections/0/tables/2/rows/0", | |
index: 0 | |
}); | |
wordsApi.deleteTableCellOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteTableOnlineRequest({ | |
document: requestDocument, | |
index: 1 | |
}); | |
wordsApi.deleteTableOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteTableRowRequest({ | |
name: "Sample.docx", | |
tablePath: "tables/1", | |
index: 0 | |
}); | |
wordsApi.deleteTableRow(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteTableRowOnlineRequest({ | |
document: requestDocument, | |
tablePath: "tables/1", | |
index: 0 | |
}); | |
wordsApi.deleteTableRowOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const deleteRequest = new model.DeleteWatermarkRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.deleteWatermark(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const deleteRequest = new model.DeleteWatermarkOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.deleteWatermarkOnline(deleteRequest) | |
.then((deleteRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of deleteRequest: ", deleteRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const downloadRequest = new model.DownloadFileRequest({ | |
path: "Sample.docx" | |
}); | |
wordsApi.downloadFile(downloadRequest) | |
.then((downloadRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of downloadRequest: ", downloadRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestOptionsCurrentUser = new model.UserInformation({ | |
name: "SdkTestUser" | |
}) | |
const requestOptions = new model.FieldOptions({ | |
currentUser: requestOptionsCurrentUser | |
}) | |
const mailMergeRequest = new model.ExecuteMailMergeRequest({ | |
name: "Sample.docx", | |
data: fs.readFileSync(BaseTest.localBaseTestDataFolder + "TestMailMergeData.xml", 'utf8'), | |
options: requestOptions | |
}); | |
wordsApi.executeMailMerge(mailMergeRequest) | |
.then((mailMergeRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of mailMergeRequest: ", mailMergeRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
// creating API instance | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const fileName = "template.doc"; | |
const destName = "Out_PostDocumentExecuteMailMergeWithHTMLData.docx"; | |
const data = fs.readFileSync("TestPostDocumentExecuteMailMerge.txt", "utf8"); | |
// upload source document | |
const uploadRequest = new UploadFileRequest(); | |
uploadRequest.path = fileName; | |
uploadRequest.fileContent = fs.createReadStream(fileName); | |
// Calling API for upload function | |
wordsApi.uploadFile(uploadRequest) | |
.then((result) => | |
{ | |
// creating request | |
const request = new ExecuteMailMergeRequest(); | |
request.name = fileName; | |
request.destFileName = destName; | |
request.data = data; | |
// Calling API function | |
wordsApi.executeMailMerge(request) | |
.then((result2) => | |
{ | |
console.log("Response: " + JSON.stringify(result2)); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
// creating API instance | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const fileName = "SampleMailMergeTemplate.docx"; | |
const destName = "Out_SampleMailMergeTemplate.docx"; | |
const data = fs.readFileSync("SampleMailMergeTemplateData.xml", "utf8"); | |
// upload source document | |
const uploadRequest = new UploadFileRequest(); | |
uploadRequest.path = fileName; | |
uploadRequest.fileContent = fs.createReadStream(fileName); | |
// Calling API for upload function | |
wordsApi.uploadFile(uploadRequest) | |
.then((result) => | |
{ | |
// creating request | |
const request = new ExecuteMailMergeRequest(); | |
request.name = fileName; | |
request.destFileName = destName; | |
request.data = data; | |
// Calling API function | |
wordsApi.executeMailMerge(request) | |
.then((result2) => | |
{ | |
console.log("Response: " + JSON.stringify(result2)); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestTemplate = fs.createReadStream("Sample.docx"); | |
const requestData = fs.createReadStream(fs.readFileSync(BaseTest.localBaseTestDataFolder + "TestMailMergeData.xml", 'utf8')); | |
const requestOptionsCurrentUser = new model.UserInformation({ | |
name: "SdkTestUser" | |
}) | |
const requestOptions = new model.FieldOptions({ | |
currentUser: requestOptionsCurrentUser | |
}) | |
const mailMergeRequest = new model.ExecuteMailMergeOnlineRequest({ | |
template: requestTemplate, | |
data: requestData, | |
options: requestOptions | |
}); | |
wordsApi.executeMailMergeOnline(mailMergeRequest) | |
.then((mailMergeRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of mailMergeRequest: ", mailMergeRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestTemplate = fs.createReadStream("TestMailMergeWithImages.doc"); | |
const requestData = fs.createReadStream("MailMergeData.json"); | |
const mailMergeRequest = new model.ExecuteMailMergeOnlineRequest({ | |
template: requestTemplate, | |
data: requestData, | |
documentFileName: "Out_TestMailMergeWithImages.doc" | |
}); | |
wordsApi.executeMailMergeOnline(mailMergeRequest) | |
.then((mailMergeRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of mailMergeRequest: ", mailMergeRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestTemplate = fs.createReadStream("template.doc"); | |
const requestData = fs.createReadStream("TestPostDocumentExecuteMailMerge.txt"); | |
const mailMergeRequest = new model.ExecuteMailMergeOnlineRequest({ | |
template: requestTemplate, | |
data: requestData, | |
documentFileName: "Out_PostDocumentExecuteMailMergeWithHTMLData.docx" | |
}); | |
wordsApi.executeMailMergeOnline(mailMergeRequest) | |
.then((mailMergeRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of mailMergeRequest: ", mailMergeRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestTemplate = fs.createReadStream("SampleMailMergeTemplate.docx"); | |
const requestData = fs.createReadStream("SampleMailMergeTemplateData.xml"); | |
const mailMergeRequest = new model.ExecuteMailMergeOnlineRequest({ | |
template: requestTemplate, | |
data: requestData, | |
documentFileName: "Out_SampleMailMergeTemplate.docx" | |
}); | |
wordsApi.executeMailMergeOnline(mailMergeRequest) | |
.then((mailMergeRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of mailMergeRequest: ", mailMergeRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetAvailableFontsRequest({ | |
}); | |
wordsApi.getAvailableFonts(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetBookmarkByNameRequest({ | |
name: "Sample.docx", | |
bookmarkName: "aspose" | |
}); | |
wordsApi.getBookmarkByName(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetBookmarkByNameOnlineRequest({ | |
document: requestDocument, | |
bookmarkName: "aspose" | |
}); | |
wordsApi.getBookmarkByNameOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetBookmarksRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getBookmarks(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetBookmarksOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getBookmarksOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetBorderRequest({ | |
name: "Sample.docx", | |
borderType: "left", | |
nodePath: "tables/1/rows/0/cells/0" | |
}); | |
wordsApi.getBorder(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetBorderOnlineRequest({ | |
document: requestDocument, | |
borderType: "left", | |
nodePath: "tables/1/rows/0/cells/0" | |
}); | |
wordsApi.getBorderOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetBordersRequest({ | |
name: "Sample.docx", | |
nodePath: "tables/1/rows/0/cells/0" | |
}); | |
wordsApi.getBorders(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetBordersOnlineRequest({ | |
document: requestDocument, | |
nodePath: "tables/1/rows/0/cells/0" | |
}); | |
wordsApi.getBordersOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetCommentRequest({ | |
name: "Sample.docx", | |
commentIndex: 0 | |
}); | |
wordsApi.getComment(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetCommentOnlineRequest({ | |
document: requestDocument, | |
commentIndex: 0 | |
}); | |
wordsApi.getCommentOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetCommentsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getComments(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetCommentsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getCommentsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetCustomXmlPartRequest({ | |
name: "Sample.docx", | |
customXmlPartIndex: 0 | |
}); | |
wordsApi.getCustomXmlPart(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetCustomXmlPartOnlineRequest({ | |
document: requestDocument, | |
customXmlPartIndex: 0 | |
}); | |
wordsApi.getCustomXmlPartOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetCustomXmlPartsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getCustomXmlParts(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetCustomXmlPartsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getCustomXmlPartsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentRequest({ | |
documentName: "Sample.docx" | |
}); | |
wordsApi.getDocument(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentDrawingObjectByIndexRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getDocumentDrawingObjectByIndex(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentDrawingObjectByIndexOnlineRequest({ | |
document: requestDocument, | |
index: 0, | |
nodePath: "sections/0" | |
}); | |
wordsApi.getDocumentDrawingObjectByIndexOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentDrawingObjectImageDataRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getDocumentDrawingObjectImageData(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentDrawingObjectImageDataOnlineRequest({ | |
document: requestDocument, | |
index: 0, | |
nodePath: "sections/0" | |
}); | |
wordsApi.getDocumentDrawingObjectImageDataOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentDrawingObjectOleDataRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getDocumentDrawingObjectOleData(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentDrawingObjectOleDataOnlineRequest({ | |
document: requestDocument, | |
index: 0, | |
nodePath: "sections/0" | |
}); | |
wordsApi.getDocumentDrawingObjectOleDataOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentDrawingObjectsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getDocumentDrawingObjects(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentDrawingObjectsOnlineRequest({ | |
document: requestDocument, | |
nodePath: "sections/0" | |
}); | |
wordsApi.getDocumentDrawingObjectsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentFieldNamesRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getDocumentFieldNames(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestTemplate = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentFieldNamesOnlineRequest({ | |
template: requestTemplate, | |
useNonMergeFields: true | |
}); | |
wordsApi.getDocumentFieldNamesOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentHyperlinkByIndexRequest({ | |
name: "Sample.docx", | |
hyperlinkIndex: 0 | |
}); | |
wordsApi.getDocumentHyperlinkByIndex(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentHyperlinkByIndexOnlineRequest({ | |
document: requestDocument, | |
hyperlinkIndex: 0 | |
}); | |
wordsApi.getDocumentHyperlinkByIndexOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentHyperlinksRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getDocumentHyperlinks(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentHyperlinksOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getDocumentHyperlinksOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentPropertiesRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getDocumentProperties(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentPropertiesOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getDocumentPropertiesOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentPropertyRequest({ | |
name: "Sample.docx", | |
propertyName: "Author" | |
}); | |
wordsApi.getDocumentProperty(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentPropertyOnlineRequest({ | |
document: requestDocument, | |
propertyName: "Author" | |
}); | |
wordsApi.getDocumentPropertyOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentProtectionRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getDocumentProtection(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentProtectionOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getDocumentProtectionOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentStatisticsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getDocumentStatistics(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetDocumentStatisticsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getDocumentStatisticsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetDocumentWithFormatRequest({ | |
name: "Sample.docx", | |
format: "text", | |
outPath: "DocumentWithFormat.text" | |
}); | |
wordsApi.getDocumentWithFormat(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetFieldRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getField(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetFieldOnlineRequest({ | |
document: requestDocument, | |
index: 0, | |
nodePath: "sections/0/paragraphs/0" | |
}); | |
wordsApi.getFieldOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetFieldsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getFields(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetFieldsOnlineRequest({ | |
document: requestDocument, | |
nodePath: "sections/0" | |
}); | |
wordsApi.getFieldsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetFilesListRequest({ | |
path: "" | |
}); | |
wordsApi.getFilesList(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetFootnoteRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getFootnote(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const request = new model.GetFootnoteOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.getFootnoteOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetFootnotesRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getFootnotes(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const request = new model.GetFootnotesOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getFootnotesOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetFormFieldRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getFormField(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetFormFieldOnlineRequest({ | |
document: requestDocument, | |
index: 0, | |
nodePath: "sections/0" | |
}); | |
wordsApi.getFormFieldOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetFormFieldsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getFormFields(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetFormFieldsOnlineRequest({ | |
document: requestDocument, | |
nodePath: "sections/0" | |
}); | |
wordsApi.getFormFieldsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetInfoRequest({ | |
}); | |
wordsApi.getInfo(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetListRequest({ | |
name: "TestGetLists.doc", | |
listId: 1 | |
}); | |
wordsApi.getList(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const request = new model.GetListOnlineRequest({ | |
document: requestDocument, | |
listId: 1 | |
}); | |
wordsApi.getListOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetListsRequest({ | |
name: "TestGetLists.doc" | |
}); | |
wordsApi.getLists(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const request = new model.GetListsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getListsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetOfficeMathObjectRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getOfficeMathObject(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetOfficeMathObjectOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.getOfficeMathObjectOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetOfficeMathObjectsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getOfficeMathObjects(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetOfficeMathObjectsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getOfficeMathObjectsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetParagraphRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getParagraph(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetParagraphFormatRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getParagraphFormat(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetParagraphFormatOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.getParagraphFormatOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetParagraphListFormatRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getParagraphListFormat(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const request = new model.GetParagraphListFormatOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.getParagraphListFormatOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetParagraphOnlineRequest({ | |
document: requestDocument, | |
index: 0, | |
nodePath: "sections/0" | |
}); | |
wordsApi.getParagraphOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetParagraphsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getParagraphs(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetParagraphsOnlineRequest({ | |
document: requestDocument, | |
nodePath: "sections/0" | |
}); | |
wordsApi.getParagraphsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetParagraphTabStopsRequest({ | |
name: "Sample.docx", | |
index: 0 | |
}); | |
wordsApi.getParagraphTabStops(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetParagraphTabStopsOnlineRequest({ | |
document: requestDocument, | |
index: 0 | |
}); | |
wordsApi.getParagraphTabStopsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetPublicKeyRequest({ | |
}); | |
wordsApi.getPublicKey(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetRangeTextRequest({ | |
name: "Sample.docx", | |
rangeStartIdentifier: "id0.0.0", | |
rangeEndIdentifier: "id0.0.1" | |
}); | |
wordsApi.getRangeText(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const request = new model.GetRangeTextOnlineRequest({ | |
document: requestDocument, | |
rangeStartIdentifier: "id0.0.0", | |
rangeEndIdentifier: "id0.0.1" | |
}); | |
wordsApi.getRangeTextOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetRunRequest({ | |
name: "Sample.docx", | |
paragraphPath: "paragraphs/0", | |
index: 0 | |
}); | |
wordsApi.getRun(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetRunFontRequest({ | |
name: "Sample.docx", | |
paragraphPath: "paragraphs/0", | |
index: 0 | |
}); | |
wordsApi.getRunFont(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetRunFontOnlineRequest({ | |
document: requestDocument, | |
paragraphPath: "paragraphs/0", | |
index: 0 | |
}); | |
wordsApi.getRunFontOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetRunOnlineRequest({ | |
document: requestDocument, | |
paragraphPath: "paragraphs/0", | |
index: 0 | |
}); | |
wordsApi.getRunOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetRunsRequest({ | |
name: "Sample.docx", | |
paragraphPath: "sections/0/paragraphs/0" | |
}); | |
wordsApi.getRuns(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetRunsOnlineRequest({ | |
document: requestDocument, | |
paragraphPath: "sections/0/paragraphs/0" | |
}); | |
wordsApi.getRunsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetSectionRequest({ | |
name: "Sample.docx", | |
sectionIndex: 0 | |
}); | |
wordsApi.getSection(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetSectionOnlineRequest({ | |
document: requestDocument, | |
sectionIndex: 0 | |
}); | |
wordsApi.getSectionOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetSectionPageSetupRequest({ | |
name: "Sample.docx", | |
sectionIndex: 0 | |
}); | |
wordsApi.getSectionPageSetup(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetSectionPageSetupOnlineRequest({ | |
document: requestDocument, | |
sectionIndex: 0 | |
}); | |
wordsApi.getSectionPageSetupOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetSectionsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getSections(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetSectionsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getSectionsOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetStructuredDocumentTagRequest({ | |
name: "Sample.docx", | |
nodePath: "sections/0/body/paragraphs/0", | |
index: 0 | |
}); | |
wordsApi.getStructuredDocumentTag(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetStructuredDocumentTagOnlineRequest({ | |
document: requestDocument, | |
nodePath: "sections/0/body/paragraphs/0", | |
index: 0 | |
}); | |
wordsApi.getStructuredDocumentTagOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetStyleRequest({ | |
name: "Sample.docx", | |
styleName: "Heading 1" | |
}); | |
wordsApi.getStyle(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetStyleFromDocumentElementRequest({ | |
name: "Sample.docx", | |
styledNodePath: "paragraphs/1/paragraphFormat" | |
}); | |
wordsApi.getStyleFromDocumentElement(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetStyleFromDocumentElementOnlineRequest({ | |
document: requestDocument, | |
styledNodePath: "paragraphs/1/paragraphFormat" | |
}); | |
wordsApi.getStyleFromDocumentElementOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetStyleOnlineRequest({ | |
document: requestDocument, | |
styleName: "Heading 1" | |
}); | |
wordsApi.getStyleOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetStylesRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getStyles(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetStylesOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getStylesOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetTableRequest({ | |
name: "Sample.docx", | |
index: 1 | |
}); | |
wordsApi.getTable(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetTableCellRequest({ | |
name: "Sample.docx", | |
tableRowPath: "sections/0/tables/2/rows/0", | |
index: 0 | |
}); | |
wordsApi.getTableCell(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetTableCellFormatRequest({ | |
name: "Sample.docx", | |
tableRowPath: "sections/0/tables/2/rows/0", | |
index: 0 | |
}); | |
wordsApi.getTableCellFormat(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetTableCellFormatOnlineRequest({ | |
document: requestDocument, | |
tableRowPath: "sections/0/tables/2/rows/0", | |
index: 0 | |
}); | |
wordsApi.getTableCellFormatOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetTableCellOnlineRequest({ | |
document: requestDocument, | |
tableRowPath: "sections/0/tables/2/rows/0", | |
index: 0 | |
}); | |
wordsApi.getTableCellOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetTableOnlineRequest({ | |
document: requestDocument, | |
index: 1 | |
}); | |
wordsApi.getTableOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetTablePropertiesRequest({ | |
name: "Sample.docx", | |
index: 1 | |
}); | |
wordsApi.getTableProperties(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetTablePropertiesOnlineRequest({ | |
document: requestDocument, | |
index: 1 | |
}); | |
wordsApi.getTablePropertiesOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetTableRowRequest({ | |
name: "Sample.docx", | |
tablePath: "tables/1", | |
index: 0 | |
}); | |
wordsApi.getTableRow(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetTableRowFormatRequest({ | |
name: "Sample.docx", | |
tablePath: "sections/0/tables/2", | |
index: 0 | |
}); | |
wordsApi.getTableRowFormat(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetTableRowFormatOnlineRequest({ | |
document: requestDocument, | |
tablePath: "sections/0/tables/2", | |
index: 0 | |
}); | |
wordsApi.getTableRowFormatOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetTableRowOnlineRequest({ | |
document: requestDocument, | |
tablePath: "tables/1", | |
index: 0 | |
}); | |
wordsApi.getTableRowOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const request = new model.GetTablesRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.getTables(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const request = new model.GetTablesOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.getTablesOnline(request) | |
.then((requestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of request: ", requestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestBookmarkStartRange = new model.NewDocumentPosition({ | |
nodeId: "0.0.0.0", | |
offset: 0 | |
}) | |
const requestBookmarkEndRange = new model.NewDocumentPosition({ | |
nodeId: "0.0.0.0", | |
offset: 0 | |
}) | |
const requestBookmark = new model.BookmarkInsert({ | |
startRange: requestBookmarkStartRange, | |
endRange: requestBookmarkEndRange, | |
name: "new_bookmark", | |
text: "Some text" | |
}) | |
const insertRequest = new model.InsertBookmarkRequest({ | |
name: "Sample.docx", | |
bookmark: requestBookmark | |
}); | |
wordsApi.insertBookmark(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestBookmarkStartRange = new model.NewDocumentPosition({ | |
nodeId: "0.0.0.0", | |
offset: 0 | |
}) | |
const requestBookmarkEndRange = new model.NewDocumentPosition({ | |
nodeId: "0.0.0.0", | |
offset: 0 | |
}) | |
const requestBookmark = new model.BookmarkInsert({ | |
startRange: requestBookmarkStartRange, | |
endRange: requestBookmarkEndRange, | |
name: "new_bookmark", | |
text: "Some text" | |
}) | |
const insertRequest = new model.InsertBookmarkOnlineRequest({ | |
document: requestDocument, | |
bookmark: requestBookmark | |
}); | |
wordsApi.insertBookmarkOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestCommentRangeStart = new model.NewDocumentPosition({ | |
nodeId: "0.3.0.3", | |
offset: 0 | |
}) | |
const requestCommentRangeEnd = new model.NewDocumentPosition({ | |
nodeId: "0.3.0.3", | |
offset: 0 | |
}) | |
const requestComment = new model.CommentInsert({ | |
rangeStart: requestCommentRangeStart, | |
rangeEnd: requestCommentRangeEnd, | |
initial: "IA", | |
author: "John Doe", | |
text: "A new Comment" | |
}) | |
const insertRequest = new model.InsertCommentRequest({ | |
name: "Sample.docx", | |
comment: requestComment | |
}); | |
wordsApi.insertComment(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestCommentRangeStart = new model.NewDocumentPosition({ | |
nodeId: "0.3.0.3", | |
offset: 0 | |
}) | |
const requestCommentRangeEnd = new model.NewDocumentPosition({ | |
nodeId: "0.3.0.3", | |
offset: 0 | |
}) | |
const requestComment = new model.CommentInsert({ | |
rangeStart: requestCommentRangeStart, | |
rangeEnd: requestCommentRangeEnd, | |
initial: "IA", | |
author: "John Doe", | |
text: "A new Comment" | |
}) | |
const insertRequest = new model.InsertCommentOnlineRequest({ | |
document: requestDocument, | |
comment: requestComment | |
}); | |
wordsApi.insertCommentOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestCustomXmlPart = new model.CustomXmlPartInsert({ | |
id: "hello", | |
data: "<data>Hello world</data>" | |
}) | |
const insertRequest = new model.InsertCustomXmlPartRequest({ | |
name: "Sample.docx", | |
customXmlPart: requestCustomXmlPart | |
}); | |
wordsApi.insertCustomXmlPart(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestCustomXmlPart = new model.CustomXmlPartInsert({ | |
id: "hello", | |
data: "<data>Hello world</data>" | |
}) | |
const insertRequest = new model.InsertCustomXmlPartOnlineRequest({ | |
document: requestDocument, | |
customXmlPart: requestCustomXmlPart | |
}); | |
wordsApi.insertCustomXmlPartOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDrawingObject = new model.DrawingObjectInsert({ | |
height: 0, | |
left: 0, | |
top: 0, | |
width: 0, | |
relativeHorizontalPosition: model.DrawingObjectInsert.RelativeHorizontalPositionEnum.Margin, | |
relativeVerticalPosition: model.DrawingObjectInsert.RelativeVerticalPositionEnum.Margin, | |
wrapType: model.DrawingObjectInsert.WrapTypeEnum.Inline | |
}) | |
const requestImageFile = fs.createReadStream("Image.png"); | |
const insertRequest = new model.InsertDrawingObjectRequest({ | |
name: "Sample.docx", | |
drawingObject: requestDrawingObject, | |
imageFile: requestImageFile | |
}); | |
wordsApi.insertDrawingObject(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestDrawingObject = new model.DrawingObjectInsert({ | |
height: 0, | |
left: 0, | |
top: 0, | |
width: 0, | |
relativeHorizontalPosition: model.DrawingObjectInsert.RelativeHorizontalPositionEnum.Margin, | |
relativeVerticalPosition: model.DrawingObjectInsert.RelativeVerticalPositionEnum.Margin, | |
wrapType: model.DrawingObjectInsert.WrapTypeEnum.Inline | |
}) | |
const requestImageFile = fs.createReadStream("Image.png"); | |
const insertRequest = new model.InsertDrawingObjectOnlineRequest({ | |
document: requestDocument, | |
drawingObject: requestDrawingObject, | |
imageFile: requestImageFile | |
}); | |
wordsApi.insertDrawingObjectOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestField = new model.FieldInsert({ | |
fieldCode: "{ NUMPAGES }" | |
}) | |
const insertRequest = new model.InsertFieldRequest({ | |
name: "Sample.docx", | |
field: requestField | |
}); | |
wordsApi.insertField(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestField = new model.FieldInsert({ | |
fieldCode: "{ NUMPAGES }" | |
}) | |
const insertRequest = new model.InsertFieldOnlineRequest({ | |
document: requestDocument, | |
field: requestField, | |
nodePath: "sections/0/paragraphs/0" | |
}); | |
wordsApi.insertFieldOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestFootnoteDto = new model.FootnoteInsert({ | |
footnoteType: model.FootnoteInsert.FootnoteTypeEnum.Endnote, | |
text: "test endnote" | |
}) | |
const insertRequest = new model.InsertFootnoteRequest({ | |
name: "Sample.docx", | |
footnoteDto: requestFootnoteDto | |
}); | |
wordsApi.insertFootnote(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const requestFootnoteDto = new model.FootnoteInsert({ | |
footnoteType: model.FootnoteInsert.FootnoteTypeEnum.Endnote, | |
text: "test endnote" | |
}) | |
const insertRequest = new model.InsertFootnoteOnlineRequest({ | |
document: requestDocument, | |
footnoteDto: requestFootnoteDto | |
}); | |
wordsApi.insertFootnoteOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestFormField = new model.FormFieldTextInput({ | |
name: "FullName", | |
enabled: true, | |
calculateOnExit: true, | |
statusText: "", | |
textInputType: model.FormFieldTextInput.TextInputTypeEnum.Regular, | |
textInputDefault: "123", | |
textInputFormat: "UPPERCASE" | |
}) | |
const insertRequest = new model.InsertFormFieldRequest({ | |
name: "Sample.docx", | |
formField: requestFormField | |
}); | |
wordsApi.insertFormField(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestFormField = new model.FormFieldTextInput({ | |
name: "FullName", | |
enabled: true, | |
calculateOnExit: true, | |
statusText: "", | |
textInputType: model.FormFieldTextInput.TextInputTypeEnum.Regular, | |
textInputDefault: "123", | |
textInputFormat: "UPPERCASE" | |
}) | |
const insertRequest = new model.InsertFormFieldOnlineRequest({ | |
document: requestDocument, | |
formField: requestFormField, | |
nodePath: "sections/0/paragraphs/0" | |
}); | |
wordsApi.insertFormFieldOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestListInsert = new model.ListInsert({ | |
template: model.ListInsert.TemplateEnum.OutlineLegal | |
}) | |
const insertRequest = new model.InsertListRequest({ | |
name: "TestGetLists.doc", | |
listInsert: requestListInsert | |
}); | |
wordsApi.insertList(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const requestListInsert = new model.ListInsert({ | |
template: model.ListInsert.TemplateEnum.OutlineLegal | |
}) | |
const insertRequest = new model.InsertListOnlineRequest({ | |
document: requestDocument, | |
listInsert: requestListInsert | |
}); | |
wordsApi.insertListOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestTabStopInsertDto = new model.TabStopInsert({ | |
alignment: model.TabStopInsert.AlignmentEnum.Left, | |
leader: model.TabStopInsert.LeaderEnum.None, | |
position: 100.0 | |
}) | |
const insertRequest = new model.InsertOrUpdateParagraphTabStopRequest({ | |
name: "Sample.docx", | |
index: 0, | |
tabStopInsertDto: requestTabStopInsertDto | |
}); | |
wordsApi.insertOrUpdateParagraphTabStop(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestTabStopInsertDto = new model.TabStopInsert({ | |
alignment: model.TabStopInsert.AlignmentEnum.Left, | |
leader: model.TabStopInsert.LeaderEnum.None, | |
position: 72 | |
}) | |
const insertRequest = new model.InsertOrUpdateParagraphTabStopOnlineRequest({ | |
document: requestDocument, | |
tabStopInsertDto: requestTabStopInsertDto, | |
index: 0 | |
}); | |
wordsApi.insertOrUpdateParagraphTabStopOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestPageNumber = new model.PageNumber({ | |
alignment: "center", | |
format: "{PAGE} of {NUMPAGES}" | |
}) | |
const insertRequest = new model.InsertPageNumbersRequest({ | |
name: "Sample.docx", | |
pageNumber: requestPageNumber | |
}); | |
wordsApi.insertPageNumbers(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestPageNumber = new model.PageNumber({ | |
alignment: "center", | |
format: "{PAGE} of {NUMPAGES}" | |
}) | |
const insertRequest = new model.InsertPageNumbersOnlineRequest({ | |
document: requestDocument, | |
pageNumber: requestPageNumber | |
}); | |
wordsApi.insertPageNumbersOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestParagraph = new model.ParagraphInsert({ | |
text: "This is a new paragraph for your document" | |
}) | |
const insertRequest = new model.InsertParagraphRequest({ | |
name: "Sample.docx", | |
paragraph: requestParagraph | |
}); | |
wordsApi.insertParagraph(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestParagraph = new model.ParagraphInsert({ | |
text: "This is a new paragraph for your document" | |
}) | |
const insertRequest = new model.InsertParagraphOnlineRequest({ | |
document: requestDocument, | |
paragraph: requestParagraph, | |
nodePath: "sections/0" | |
}); | |
wordsApi.insertParagraphOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestRun = new model.RunInsert({ | |
text: "run with text" | |
}) | |
const insertRequest = new model.InsertRunRequest({ | |
name: "Sample.docx", | |
paragraphPath: "paragraphs/1", | |
run: requestRun | |
}); | |
wordsApi.insertRun(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const requestRun = new model.RunInsert({ | |
text: "run with text" | |
}) | |
const insertRequest = new model.InsertRunOnlineRequest({ | |
document: requestDocument, | |
paragraphPath: "paragraphs/1", | |
run: requestRun | |
}); | |
wordsApi.insertRunOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestStructuredDocumentTag = new model.StructuredDocumentTagInsert({ | |
sdtType: model.StructuredDocumentTagInsert.SdtTypeEnum.ComboBox, | |
level: model.StructuredDocumentTagInsert.LevelEnum.Inline | |
}) | |
const insertRequest = new model.InsertStructuredDocumentTagRequest({ | |
name: "Sample.docx", | |
structuredDocumentTag: requestStructuredDocumentTag, | |
nodePath: "sections/0/body/paragraphs/0" | |
}); | |
wordsApi.insertStructuredDocumentTag(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestStructuredDocumentTag = new model.StructuredDocumentTagInsert({ | |
sdtType: model.StructuredDocumentTagInsert.SdtTypeEnum.ComboBox, | |
level: model.StructuredDocumentTagInsert.LevelEnum.Inline | |
}) | |
const insertRequest = new model.InsertStructuredDocumentTagOnlineRequest({ | |
document: requestDocument, | |
structuredDocumentTag: requestStructuredDocumentTag, | |
nodePath: "sections/0/body/paragraphs/0" | |
}); | |
wordsApi.insertStructuredDocumentTagOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestStyleInsert = new model.StyleInsert({ | |
styleName: "My Style", | |
styleType: model.StyleInsert.StyleTypeEnum.Paragraph | |
}) | |
const insertRequest = new model.InsertStyleRequest({ | |
name: "Sample.docx", | |
styleInsert: requestStyleInsert | |
}); | |
wordsApi.insertStyle(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestStyleInsert = new model.StyleInsert({ | |
styleName: "My Style", | |
styleType: model.StyleInsert.StyleTypeEnum.Paragraph | |
}) | |
const insertRequest = new model.InsertStyleOnlineRequest({ | |
document: requestDocument, | |
styleInsert: requestStyleInsert | |
}); | |
wordsApi.insertStyleOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestTable = new model.TableInsert({ | |
columnsCount: 5, | |
rowsCount: 4 | |
}) | |
const insertRequest = new model.InsertTableRequest({ | |
name: "Sample.docx", | |
table: requestTable | |
}); | |
wordsApi.insertTable(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestCell = new model.TableCellInsert({ | |
}) | |
const insertRequest = new model.InsertTableCellRequest({ | |
name: "Sample.docx", | |
cell: requestCell, | |
tableRowPath: "sections/0/tables/2/rows/0" | |
}); | |
wordsApi.insertTableCell(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestCell = new model.TableCellInsert({ | |
}) | |
const insertRequest = new model.InsertTableCellOnlineRequest({ | |
document: requestDocument, | |
cell: requestCell, | |
tableRowPath: "sections/0/tables/2/rows/0" | |
}); | |
wordsApi.insertTableCellOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestTable = new model.TableInsert({ | |
columnsCount: 5, | |
rowsCount: 4 | |
}) | |
const insertRequest = new model.InsertTableOnlineRequest({ | |
document: requestDocument, | |
table: requestTable | |
}); | |
wordsApi.insertTableOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestRow = new model.TableRowInsert({ | |
columnsCount: 5 | |
}) | |
const insertRequest = new model.InsertTableRowRequest({ | |
name: "Sample.docx", | |
row: requestRow, | |
tablePath: "sections/0/tables/2" | |
}); | |
wordsApi.insertTableRow(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestRow = new model.TableRowInsert({ | |
columnsCount: 5 | |
}) | |
const insertRequest = new model.InsertTableRowOnlineRequest({ | |
document: requestDocument, | |
row: requestRow, | |
tablePath: "sections/0/tables/2" | |
}); | |
wordsApi.insertTableRowOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const insertRequest = new model.InsertWatermarkImageRequest({ | |
name: "Sample.docx", | |
imageFile: undefined, | |
image: "Sample.png" | |
}); | |
wordsApi.insertWatermarkImage(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestImageFile = fs.createReadStream("Image.png"); | |
const insertRequest = new model.InsertWatermarkImageOnlineRequest({ | |
document: requestDocument, | |
imageFile: requestImageFile | |
}); | |
wordsApi.insertWatermarkImageOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestWatermarkText = new model.WatermarkText({ | |
text: "This is the text", | |
rotationAngle: 90.0 | |
}) | |
const insertRequest = new model.InsertWatermarkTextRequest({ | |
name: "Sample.docx", | |
watermarkText: requestWatermarkText | |
}); | |
wordsApi.insertWatermarkText(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestWatermarkText = new model.WatermarkText({ | |
text: "This is the text", | |
rotationAngle: 90 | |
}) | |
const insertRequest = new model.InsertWatermarkTextOnlineRequest({ | |
document: requestDocument, | |
watermarkText: requestWatermarkText | |
}); | |
wordsApi.insertWatermarkTextOnline(insertRequest) | |
.then((insertRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of insertRequest: ", insertRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDataSaveOptions = new model.DocSaveOptionsData({ | |
fileName: "google.doc", | |
dmlEffectsRenderingMode: model.DocSaveOptionsData.DmlEffectsRenderingModeEnum.None, | |
dmlRenderingMode: model.DocSaveOptionsData.DmlRenderingModeEnum.DrawingML, | |
updateSdtContent: false, | |
zipOutput: false | |
}) | |
const requestData = new model.LoadWebDocumentData({ | |
loadingDocumentUrl: "http://google.com", | |
saveOptions: requestDataSaveOptions | |
}) | |
const loadRequest = new model.LoadWebDocumentRequest({ | |
data: requestData | |
}); | |
wordsApi.loadWebDocument(loadRequest) | |
.then((loadRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of loadRequest: ", loadRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const moveRequest = new model.MoveFileRequest({ | |
destPath: "MoveFileSample.docx", | |
srcPath: "Sample.docx" | |
}); | |
wordsApi.moveFile(moveRequest) | |
.then((moveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of moveRequest: ", moveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const moveRequest = new model.MoveFolderRequest({ | |
destPath: "/TestMoveFolderDest_Sample", | |
srcPath: "/TestMoveFolderSrc" | |
}); | |
wordsApi.moveFolder(moveRequest) | |
.then((moveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of moveRequest: ", moveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestOptions = new model.OptimizationOptions({ | |
msWordVersion: model.OptimizationOptions.MsWordVersionEnum.Word2002 | |
}) | |
const optimizeRequest = new model.OptimizeDocumentRequest({ | |
name: "Sample.docx", | |
options: requestOptions | |
}); | |
wordsApi.optimizeDocument(optimizeRequest) | |
.then((optimizeRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of optimizeRequest: ", optimizeRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestOptions = new model.OptimizationOptions({ | |
msWordVersion: model.OptimizationOptions.MsWordVersionEnum.Word2002 | |
}) | |
const optimizeRequest = new model.OptimizeDocumentOnlineRequest({ | |
document: requestDocument, | |
options: requestOptions | |
}); | |
wordsApi.optimizeDocumentOnline(optimizeRequest) | |
.then((optimizeRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of optimizeRequest: ", optimizeRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestProtectionRequest = new model.ProtectionRequest({ | |
password: "123", | |
protectionType: "ReadOnly" | |
}) | |
const protectRequest = new model.ProtectDocumentRequest({ | |
name: "Sample.docx", | |
protectionRequest: requestProtectionRequest | |
}); | |
wordsApi.protectDocument(protectRequest) | |
.then((protectRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of protectRequest: ", protectRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestProtectionRequest = new model.ProtectionRequest({ | |
newPassword: "123" | |
}) | |
const protectRequest = new model.ProtectDocumentOnlineRequest({ | |
document: requestDocument, | |
protectionRequest: requestProtectionRequest | |
}); | |
wordsApi.protectDocumentOnline(protectRequest) | |
.then((protectRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of protectRequest: ", protectRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const rejectRequest = new model.RejectAllRevisionsRequest({ | |
name: "Sample.docx" | |
}); | |
wordsApi.rejectAllRevisions(rejectRequest) | |
.then((rejectRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of rejectRequest: ", rejectRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const rejectRequest = new model.RejectAllRevisionsOnlineRequest({ | |
document: requestDocument | |
}); | |
wordsApi.rejectAllRevisionsOnline(rejectRequest) | |
.then((rejectRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of rejectRequest: ", rejectRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const removeRequest = new model.RemoveRangeRequest({ | |
name: "Sample.docx", | |
rangeStartIdentifier: "id0.0.0", | |
rangeEndIdentifier: "id0.0.1" | |
}); | |
wordsApi.removeRange(removeRequest) | |
.then((removeRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of removeRequest: ", removeRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const removeRequest = new model.RemoveRangeOnlineRequest({ | |
document: requestDocument, | |
rangeStartIdentifier: "id0.0.0", | |
rangeEndIdentifier: "id0.0.1" | |
}); | |
wordsApi.removeRangeOnline(removeRequest) | |
.then((removeRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of removeRequest: ", removeRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const renderRequest = new model.RenderDrawingObjectRequest({ | |
name: "Sample.docx", | |
format: "png", | |
index: 0 | |
}); | |
wordsApi.renderDrawingObject(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const renderRequest = new model.RenderDrawingObjectOnlineRequest({ | |
document: requestDocument, | |
format: "png", | |
index: 0, | |
nodePath: "sections/0" | |
}); | |
wordsApi.renderDrawingObjectOnline(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const renderRequest = new model.RenderMathObjectRequest({ | |
name: "Sample.docx", | |
format: "png", | |
index: 0 | |
}); | |
wordsApi.renderMathObject(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const renderRequest = new model.RenderMathObjectOnlineRequest({ | |
document: requestDocument, | |
format: "png", | |
index: 0 | |
}); | |
wordsApi.renderMathObjectOnline(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const renderRequest = new model.RenderPageRequest({ | |
name: "Sample.docx", | |
pageIndex: 1, | |
format: "jpg" | |
}); | |
wordsApi.renderPage(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const renderRequest = new model.RenderPageOnlineRequest({ | |
document: requestDocument, | |
pageIndex: 1, | |
format: "jpg" | |
}); | |
wordsApi.renderPageOnline(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const renderRequest = new model.RenderParagraphRequest({ | |
name: "Sample.docx", | |
format: "png", | |
index: 0 | |
}); | |
wordsApi.renderParagraph(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const renderRequest = new model.RenderParagraphOnlineRequest({ | |
document: requestDocument, | |
format: "png", | |
index: 0 | |
}); | |
wordsApi.renderParagraphOnline(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const renderRequest = new model.RenderTableRequest({ | |
name: "Sample.docx", | |
format: "png", | |
index: 0 | |
}); | |
wordsApi.renderTable(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const renderRequest = new model.RenderTableOnlineRequest({ | |
document: requestDocument, | |
format: "png", | |
index: 0 | |
}); | |
wordsApi.renderTableOnline(renderRequest) | |
.then((renderRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of renderRequest: ", renderRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestReplaceText = new model.ReplaceTextParameters({ | |
oldValue: "Testing", | |
newValue: "Aspose testing" | |
}) | |
const replaceRequest = new model.ReplaceTextRequest({ | |
name: "Sample.docx", | |
replaceText: requestReplaceText | |
}); | |
wordsApi.replaceText(replaceRequest) | |
.then((replaceRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of replaceRequest: ", replaceRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestReplaceText = new model.ReplaceTextParameters({ | |
oldValue: "aspose", | |
newValue: "aspose new" | |
}) | |
const replaceRequest = new model.ReplaceTextOnlineRequest({ | |
document: requestDocument, | |
replaceText: requestReplaceText | |
}); | |
wordsApi.replaceTextOnline(replaceRequest) | |
.then((replaceRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of replaceRequest: ", replaceRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestRangeText = new model.ReplaceRange({ | |
text: "Replaced header" | |
}) | |
const replaceRequest = new model.ReplaceWithTextRequest({ | |
name: "Sample.docx", | |
rangeStartIdentifier: "id0.0.0", | |
rangeText: requestRangeText, | |
rangeEndIdentifier: "id0.0.1" | |
}); | |
wordsApi.replaceWithText(replaceRequest) | |
.then((replaceRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of replaceRequest: ", replaceRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const requestRangeText = new model.ReplaceRange({ | |
text: "Replaced header" | |
}) | |
const replaceRequest = new model.ReplaceWithTextOnlineRequest({ | |
document: requestDocument, | |
rangeStartIdentifier: "id0.0.0", | |
rangeText: requestRangeText, | |
rangeEndIdentifier: "id0.0.1" | |
}); | |
wordsApi.replaceWithTextOnline(replaceRequest) | |
.then((replaceRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of replaceRequest: ", replaceRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const resetRequest = new model.ResetCacheRequest({ | |
}); | |
wordsApi.resetCache(resetRequest) | |
.then((resetRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of resetRequest: ", resetRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestSaveOptionsData = new model.DocxSaveOptionsData({ | |
fileName: "FromPdfToDoc.docx" | |
}) | |
const saveRequest = new model.SaveAsRequest({ | |
name: "Sample.docx", | |
saveOptionsData: requestSaveOptionsData | |
}); | |
wordsApi.saveAs(saveRequest) | |
.then((saveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of saveRequest: ", saveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
// creating API instance | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const fileName = "test_multi_pages.pdf"; | |
const format = "docx"; | |
const destName = "Out_test_multi_pages.docx"; | |
// upload source document | |
const uploadRequest = new UploadFileRequest(); | |
uploadRequest.path = fileName; | |
uploadRequest.fileContent = fs.createReadStream(fileName); | |
// Calling API for upload function | |
wordsApi.uploadFile(uploadRequest) | |
.then((result) => | |
{ | |
// creating request | |
const request = new SaveAsRequest(); | |
request.name = fileName; | |
request.saveOptionsData = new SaveOptionsData( | |
{ | |
saveFormat: format, | |
fileName: destName | |
}); | |
// Calling API function | |
wordsApi.saveAs(request) | |
.then((result2) => | |
{ | |
console.log("Response: " + JSON.stringify(result2)); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
// creating API instance | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const fileName = "test_multi_pages.docx"; | |
const format = "html"; | |
const destName = "Out_test_multi_pages.html"; | |
// upload source document | |
const uploadRequest = new UploadFileRequest(); | |
uploadRequest.path = fileName; | |
uploadRequest.fileContent = fs.createReadStream(fileName); | |
// Calling API for upload function | |
wordsApi.uploadFile(uploadRequest) | |
.then((result) => | |
{ | |
// creating request | |
const request = new SaveAsRequest(); | |
request.name = fileName; | |
request.saveOptionsData = new SaveOptionsData( | |
{ | |
saveFormat: format, | |
fileName: destName | |
}); | |
// Calling API function | |
wordsApi.saveAs(request) | |
.then((result2) => | |
{ | |
console.log("Response: " + JSON.stringify(result2)); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("test_multi_pages.docx"); | |
const requestSaveOptionsData = new model.HtmlSaveOptionsData({ | |
fileName: "/TestSaveAsHtml.html", | |
cssStyleSheetType: model.HtmlSaveOptionsData.CssStyleSheetTypeEnum.External, | |
cssStyleSheetFileName: "/TestSaveAsHtml.css" | |
}) | |
const saveRequest = new model.SaveAsOnlineRequest({ | |
document: requestDocument, | |
saveOptionsData: requestSaveOptionsData | |
}); | |
wordsApi.saveAsOnline(saveRequest) | |
.then((saveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of saveRequest: ", saveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestSaveOptionsData = new model.SaveOptionsData({ | |
saveFormat: "pdf", | |
fileName: "Sample_out.pdf" | |
}) | |
const saveRequest = new model.SaveAsOnlineRequest({ | |
document: requestDocument, | |
saveOptionsData: requestSaveOptionsData | |
}); | |
wordsApi.saveAsOnline(saveRequest) | |
.then((saveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of saveRequest: ", saveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const requestSaveOptionsData = new model.SaveOptionsData({ | |
saveFormat: "html", | |
fileName: "Sample_out.html" | |
}) | |
const saveRequest = new model.SaveAsOnlineRequest({ | |
document: requestDocument, | |
saveOptionsData: requestSaveOptionsData | |
}); | |
wordsApi.saveAsOnline(saveRequest) | |
.then((saveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of saveRequest: ", saveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocumentParameters = new model.RangeDocument({ | |
documentName: "NewDocument.docx" | |
}) | |
const saveRequest = new model.SaveAsRangeRequest({ | |
name: "Sample.docx", | |
rangeStartIdentifier: "id0.0.0", | |
documentParameters: requestDocumentParameters, | |
rangeEndIdentifier: "id0.0.1" | |
}); | |
wordsApi.saveAsRange(saveRequest) | |
.then((saveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of saveRequest: ", saveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.doc"); | |
const requestDocumentParameters = new model.RangeDocument({ | |
documentName: "NewDocument.docx" | |
}) | |
const saveRequest = new model.SaveAsRangeOnlineRequest({ | |
document: requestDocument, | |
rangeStartIdentifier: "id0.0.0", | |
documentParameters: requestDocumentParameters, | |
rangeEndIdentifier: "id0.0.1" | |
}); | |
wordsApi.saveAsRangeOnline(saveRequest) | |
.then((saveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of saveRequest: ", saveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestSaveOptions = new model.TiffSaveOptionsData({ | |
fileName: "Image.tiff" | |
}) | |
const saveRequest = new model.SaveAsTiffRequest({ | |
name: "Sample.docx", | |
saveOptions: requestSaveOptions | |
}); | |
wordsApi.saveAsTiff(saveRequest) | |
.then((saveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of saveRequest: ", saveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("test_multi_pages.docx"); | |
const requestSaveOptions = new model.TiffSaveOptionsData({ | |
fileName: "Image.tiff" | |
}) | |
const saveRequest = new model.SaveAsTiffOnlineRequest({ | |
document: requestDocument, | |
saveOptions: requestSaveOptions | |
}); | |
wordsApi.saveAsTiffOnline(saveRequest) | |
.then((saveRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of saveRequest: ", saveRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const searchRequest = new model.SearchRequest({ | |
name: "Sample.docx", | |
pattern: "aspose" | |
}); | |
wordsApi.search(searchRequest) | |
.then((searchRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of searchRequest: ", searchRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const searchRequest = new model.SearchOnlineRequest({ | |
document: requestDocument, | |
pattern: "aspose" | |
}); | |
wordsApi.searchOnline(searchRequest) | |
.then((searchRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of searchRequest: ", searchRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const splitRequest = new model.SplitDocumentRequest({ | |
name: "Sample.docx", | |
format: "text", | |
destFileName: "SplitDocument.text", | |
from: 1, | |
to: 2 | |
}); | |
wordsApi.splitDocument(splitRequest) | |
.then((splitRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of splitRequest: ", splitRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
// creating API instance | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const fileName = "test_multi_pages.docx"; | |
const format = "png"; | |
const from = 1; // Splitting starts from the first page of the document | |
const to = 1; // splitting ends at the last page of the document | |
// upload source document | |
const uploadRequest = new UploadFileRequest(); | |
uploadRequest.path = fileName; | |
uploadRequest.fileContent = fs.createReadStream(fileName); | |
// Calling API for upload function | |
wordsApi.uploadFile(uploadRequest) | |
.then((result) => | |
{ | |
// creating request | |
const request = new SplitDocumentRequest(); | |
request.name = fileName; | |
request.format = format; | |
request.from = from; | |
request.to = to; | |
// Calling API function | |
wordsApi.splitDocument(request) | |
.then((result2) => | |
{ | |
console.log("Response: " + JSON.stringify(result2)); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
// creating API instance | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const fileName = "test_multi_pages.docx"; | |
const format = "pdf"; | |
const from = 1; // Splitting starts from the first page of the document | |
const to = 2; // splitting ends at the last page of the document | |
// upload source document | |
const uploadRequest = new UploadFileRequest(); | |
uploadRequest.path = fileName; | |
uploadRequest.fileContent = fs.createReadStream(fileName); | |
// Calling API for upload function | |
wordsApi.uploadFile(uploadRequest) | |
.then((result) => | |
{ | |
// creating request | |
const request = new SplitDocumentRequest(); | |
request.name = fileName; | |
request.format = format; | |
request.from = from; | |
request.to = to; | |
// Calling API function | |
wordsApi.splitDocument(request) | |
.then((result2) => | |
{ | |
console.log("Response: " + JSON.stringify(result2)); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const splitRequest = new model.SplitDocumentOnlineRequest({ | |
document: requestDocument, | |
format: "text", | |
destFileName: "SplitDocument.text", | |
from: 1, | |
to: 2 | |
}); | |
wordsApi.splitDocumentOnline(splitRequest) | |
.then((splitRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of splitRequest: ", splitRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const splitRequest = new model.SplitDocumentOnlineRequest({ | |
document: requestDocument, | |
format: "png", | |
from: 1, | |
to: 2 | |
}); | |
wordsApi.splitDocumentOnline(splitRequest) | |
.then((splitRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of splitRequest: ", splitRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestDocument = fs.createReadStream("Sample.docx"); | |
const splitRequest = new model.SplitDocumentOnlineRequest({ | |
document: requestDocument, | |
format: "pdf", | |
from: 1, | |
to: 2 | |
}); | |
wordsApi.splitDocumentOnline(splitRequest) | |
.then((splitRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of splitRequest: ", splitRequestResult); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const clientId = "####-####-####-####-####"; | |
const secret = "##################"; | |
const wordsApi = new WordsApi(clientId, secret); | |
const requestProtectionRequest = new model.ProtectionRequest({ | |
password: "aspose" | |
}) | |
const unprotectRequest = new model.UnprotectDocumentRequest({ | |
name: "Sample.docx", | |
protectionRequest: requestProtectionRequest | |
}); | |
wordsApi.unprotectDocument(unprotectRequest) | |
.then((unprotectRequestResult) => { | |
// tslint:disable-next-line:no-console | |
console.log("Result of unprotectRequest: ", unprotectRequestResult); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment