Chinaunix首页 | 论坛 | 博客
  • 博客访问: 735278
  • 博文数量: 769
  • 博客积分: 6000
  • 博客等级: 准将
  • 技术积分: 4985
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:37
文章分类

全部博文(769)

文章存档

2011年(1)

2008年(768)

我的朋友

分类:

2008-10-15 16:40:00

 //创建Word文档
std::string create_new();
//保存Word文档
std::string close_save(const char* filename);
//selection 往下移,以继续生成下一元素
std::string move_down();
//插入分段符
std::string put_Paragraph();
//添加标题
std::string put_title(const char* title, const char* title_type="标题 1", int align=ALIGN_LEFT);
//添加“标题1”
std::string put_title1(const char* title, int align=ALIGN_CENTER);
//添加“标题2”
std::string put_title2(const char* title, int align=ALIGN_LEFT);
//添加“标题3”
std::string put_title3(const char* title, int align=ALIGN_LEFT);
//添加红色警告信息
std::string add_warning_msg(const char* msg="无数据");
//添加表格的一行数据(不用此函数)
std::string add_grid_ln(const char* line);
//添加表格
std::string put_grid(const char* content);

//运行脚本
extern "C" void RunScript(const char* script_str);   下面是一个小例子,我们期望它在您的计算机上能够很好的运行,程序将生成一个Word文档,路径位于c:\test.doc,计算机上需要安装Word XP。
int main(int argc, char* argv[])
{
ostringstream ostr;
ostr<
ostr< ostr<
std::string str_buffer;
read_file_as_grid_content("tab.txt", str_buffer);

ostr< ostr< ostr<
//输出到文件看看VB脚本的内容
/*
std::ofstream ofile;
ofile.open("c:\\temp.vbs");
ofile< ofile.close();
*/
//BeginWaitCursor();
RunScript( ostr.str().c_str() );//运行生成的脚本
//EndWaitCursor();
return 0;
}

--------------------next---------------------

阅读(526) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~