mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 13:27:15 +08:00
* Merge updates (#4) * Merge upstream updates (#5) * Initial commit for MS OFfice Automation * Modified activex-excel and tests; activex-msforms * ADODB tests, DAO tests * msforms, msxml, mshtml * MSXML tests * Office, VBIDE, Word * Word * Word * Outlook, Powerpoint * Added project URL for stdole * Added 'private' to package.json * activex-adodb fixes * remove public member-access * activex-adodb fixes * activex-adodb tests fixes * activex-adodb-tests fix * activex-adodb-tests fix -- no-unnecessary-generics * remove public modifier * TravisCI fixes * More TravisCI fixes * More TravisCI fixes
20 lines
611 B
TypeScript
20 lines
611 B
TypeScript
/// <reference types="activex-word" />
|
|
|
|
let app = new ActiveXObject('Word.Application');
|
|
let dlg = app.FileDialog(Office.MsoFileDialogType.msoFileDialogFolderPicker);
|
|
dlg.AllowMultiSelect = true;
|
|
dlg.Title = 'Select one or more folders';
|
|
dlg.Execute();
|
|
let enumerator = new Enumerator(dlg.SelectedItems);
|
|
enumerator.moveFirst();
|
|
while (!enumerator.atEnd()) {
|
|
WScript.Echo(enumerator.item);
|
|
}
|
|
|
|
let enumerator2 = new Enumerator(app.COMAddIns);
|
|
enumerator2.moveFirst();
|
|
while (!enumerator2.atEnd()) {
|
|
const item = enumerator2.item();
|
|
WScript.Echo(`COM Addin: ${item.Description} -- ${item.ProgId}`);
|
|
}
|