Can I insert a button inside a word document and execute some codes after a user click the button?
How to do it?
This discussion is open to suggestions.
Many thanks for replying.
[此贴子已经被作者于2007-8-14 10:53:10编辑过]
Can I insert a button inside a word document and execute some codes after a user click the button?
How to do it?
This discussion is open to suggestions.
Many thanks for replying.
[此贴子已经被作者于2007-8-14 10:53:10编辑过]
我在VB中调用Word时,通过下面的语句向word的工具栏中添加了1个按钮,名为"保存"
======================================
Set oBars = wdWord.CommandBars
Set oNewBar = oBars.Add("保存", , , Temporary:=True)
oNewBar.Visible = True
Set oNewButton1 = oNewBar.Controls.Add(msoControlButton)
oNewButton1.Style = msoButtonIconAndCaption
oNewButton1.Caption = "保存"
======================================
请问可不可以对这个新添加的"保存"按钮写上代码让他执行我想要的操作.例如执行
把当前操作的这个文档存到数据库中.
如果可以的话,应该在哪儿写呢. 问题点数:100、回复次数:1Top
试试对
Application.VBE属性操作