VC操作Word系列(2)

2020-02-21 02:16

sel.TypeText(_T(\

sel.MoveRight(COleVariant((short)1),COleVariant(short(1)),COleVariant(short(0)));

sel.TypeText(_T(\

sel.MoveRight(COleVariant((short)1),COleVariant(short(1)),COleVariant(short(0)));

sel.TypeText(_T(\

sel.MoveRight(COleVariant((short)1),COleVariant(short(1)),COleVariant(short(0)));

sel.TypeText(_T(\

sel.MoveRight(COleVariant((short)1),COleVariant(short(1)),COleVariant(short(0)));

sel.TypeText(_T(\

sel.MoveRight(COleVariant((short)1),COleVariant(short(1)),COleVariant(short(0)));

sel.TypeText(_T(\

sel.MoveRight(COleVariant((short)1),COleVariant(short(1)),COleVariant(short(0)));

sel.TypeText(_T(\

sel.MoveRight(COleVariant((short)1),COleVariant(short(1)),COleVariant(short(0)));

sel.TypeText(_T(\

sel.MoveRight(COleVariant((short)1),COleVariant(short(1)),COleVariant(short(0)));

sel.TypeText(_T(\

sel.MoveRight(COleVariant((short)1),COleVariant(short(1)),COleVariant(short(0)));

sel.TypeText(_T(\int i=0,j=0;

for(i=2;i<7;i+=2) { Cell c1=table.Cell(i,1); Cell c2=table.Cell(i+1,1); c1.Merge(c2); c1.ReleaseDispatch(); c2.ReleaseDispatch(); }

Cell c;

CString strName[]={\for(j=0,i=0;i<3;++i,j+=2) { c=table.Cell(j+2,1); c.Select(); Cells cs=sel.GetCells();

cs.SetVerticalAlignment(1); sel.TypeText(strName[i]); sel.MoveDown(COleVariant((short)5),COleVariant(short(1)),COleVariant(short(0))); cs.ReleaseDispatch(); c.ReleaseDispatch(); }

c=table.Cell(7,1); c.Select();

for(i=0,j=0;i<6;++i,++j) { if(i%2==0) j=0; sel.TypeText(strDate[j]); sel.MoveUp(COleVariant((short)5),COleVariant(short(1)),COleVariant(short(0))); }

c.ReleaseDispatch(); app.SetVisible(TRUE); table.ReleaseDispatch(); tables.ReleaseDispatch(); sel.ReleaseDispatch(); docs.ReleaseDispatch(); saveDoc.ReleaseDispatch(); app.SetVisible(TRUE); app.ReleaseDispatch(); }

运行一下看看版面比以前好多了吧


VC操作Word系列(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:传染病学课程讲义目录

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: