void ChartWindow::makeWordDoc()
{
char const* const WordDocumentSaveAs = "SaveAs(QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&, QVariant&)";
char const* const WordDocumentsAdd = "Add(QVariant&, QVariant&, WdNewDocumentType, QVariant&)";
char const* const TablesAdd = "Add(QVariant&, QVariant&, QVariant&, QVariant&, QVariant&)";
CoInitialize(NULL);
QAxObject *wordApp = new QAxObject("Word.Application");
wordApp->setProperty("Visible", true);
QAxObject *wordDocs = wordApp->querySubObject("Documents");
QAxObject *wordDoc = wordDocs->querySubObject(WordDocumentsAdd,"Normal",false,"wdNewBlankDocument",true);
QAxObject *range = wordDoc->querySubObject( "Content()" );
QAxObject *tables = wordDoc->querySubObject("Tables()");
range->dynamicCall( "Expand(wdTable)" );
range->dynamicCall( "Collapse(0)" );
QAxObject *table = tables->querySubObject(TablesAdd, range->asVariant(),3,2,"wdWord9TableBehavior","wdAutoFitWindow");
wordDoc->dynamicCall(WordDocumentSaveAs, "d:∖∖text.doc");
}
Привет!
Похоже, вы зашли сюда первый раз, и еще не знаете что
такое МоёМесто.ru?
Это сервис интернет закладок. Для чего он может вам пригодится?
Здесь вы можете хранить все свои закладки
Просто
зарегистрируйтесь, установите панель
МоёМесто::Панель в свой браузер,
и вы сможете сохранить любую страницу в Интернете в один клик.
А если у вас уже есть коллекция любимых ссылок в браузере — вы можете
импортировать их в
МоеМесто.
Здесь вы можете хранить любые файлы
Картинки, фотографии, документы, музыку и даже видео — все что угодно.
500 Мегабайт дискового пространства
предоставляется бесплатно.
Время хранения файлов
не ограниченно.
Зарегистрируйтесь
прямо сейчас, и уже через несколько секунд
вы сможете хранить свои закладки в Интернете!