// WordApplication.h: interface for the CWordApplication class. // ////////////////////////////////////////////////////////////////////// #if !defined(__WORDAPPLICATION_H__) #define __WORDAPPLICATION_H__ #include "msword8.h" #include "excel9.h" #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class TARCH_EXP CWordApplication { public: BOOL OpenDiskDocument(LPCTSTR fileName); CWordApplication(); virtual ~CWordApplication(); _Application wordApplication; Documents wordDocuments; _Document activeDocument; Paragraphs wordParagraphs; Tables wordTables; Selection wordSelection; Window windowsHan; BOOL InitWordApplication(BOOL visible); void Show(bool bShow=true){wordApplication.SetVisible(bShow);} BOOL CreateAndOpenDocument(LPCTSTR fileName); void CreateDocument(); void GoToTheEnd(); void InsertEmptyLines(int numLines); BOOL SaveAndQuit(LPCTSTR fileName); Shape AddPicture(CString fileName, BOOL linkToFile, BOOL saveWithDoc, float left, float top, float width, float height); InlineShape AddPicture_Han(CString fileName, BOOL linkToFile, BOOL saveWithDoc, BOOL Range); long MoveDown_han(int Number); void smallscroll(BOOL , BOOL , float ,float ); Shape AddOloObject(CString id, CString fName, BOOL linkToFile, BOOL displayAsIcon, CString icnFileName, int icnIndex, CString icnLabel, float left, float top, float width, float height); Shape AddLine(float x1, float y1, float x2, float y2); void AddText(CString text,CString font,float height, int algin,float spacing,BOOL bold = FALSE, BOOL italic = FALSE,int color = 0); void AddText2(CString text, float height, int algin , BOOL bold = FALSE, BOOL italic = FALSE); _Table CreateTable(int rows, int columns, CWordArray& widths, int height); void SetShading(_Table oTable, int row, int colorIndex, BOOL boldFlag); void FillRow(_Table pTable, int Row, CString text1, CString text2, CString text3, CString text4); void FillRow6(_Table pTable, int Row, CString text1, CString text2, CString text3, CString text4,CString Text5,CString Text6); void FillRow7(_Table pTable, int Row, CString text1, CString text2, CString text3, CString text4,CString Text5,CString Text6,CString Text7); void FillRow10(_Table pTable, int Row, CString text1, CString text2, CString text3, CString text4,CString Text5,CString Text6,CString Text7,CString Text8,CString Text9,CString Text10); void SetItemText(_Table pTable, int nRow, int nCol, CString textStr); ////////////////////////////////////////////////////////////////////////////////////////////////// // it was named by han long getEndKey_han( ); }; #endif // !defined(__WORDAPPLICATION_H__)