📄 vbs.h
字号:
// vbs.h v1.0
// Purpose: facilities for MSWord VBA scripts.
// by hujinshan @2004-12-8 22:02:30
#ifndef _VBS_H_
#define _VBS_H_
#include <string>
enum{ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT};
std::string& str_trim_left(std::string& str);
std::string& str_trim_right(std::string& str);
std::string& str_trim(std::string& str);
//创建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);
#pragma comment(lib, "ScriptHost.lib")
#endif // _VBS_H_
// end of file
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -