永发信息网

word vba 创建按钮,并绑定事件

答案:2  悬赏:80  手机版
解决时间 2021-03-03 22:02
  • 提问者网友:川水往事
  • 2021-03-03 17:39
word vba 创建按钮,并绑定事件
最佳答案
  • 五星知识达人网友:渊鱼
  • 2021-03-03 17:51
直接插入按钮,就可以了
全部回答
  • 1楼网友:白昼之月
  • 2021-03-03 18:02
没有悬赏分,高手们都不愿意做义工了,哈哈! 不旦帮你解决了问题,而且做了完善,哥们一定要及时采纳哟。 sub newtable() '新建文档,可视 dim docnew as new word.document dim wdapp as word.application set wdapp = docnew.application wdapp.visible = true '可视 '在新建的文档内插入表格 dim tblnew as word.table dim intx as integer, inty as integer set tblnew = docnew.tables.add(docnew.sections(1).range, 3, 5) '也可以用下面注释的语句代替 'set tblnew = docnew.tables.add(wdapp.selection.range, 3, 5) with tblnew for intx = 1 to 3 for inty = 1 to 5 .cell(intx, inty).range.insertafter "cell: r" & intx & ", c" & inty next inty next intx .columns.autofit end with '恢复环境 with docnew '.saveas "fullpathfilename" '保存新建文档 .close false end with wdapp.quit set tblnew = nothing set docnew = nothing set wdapp = nothing end sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯