将Word模板添加到自定义功能区 [英] Adding a Word Template to a custom Ribbon

查看:308
本文介绍了将Word模板添加到自定义功能区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,确定这是一个很好的答案。

Hello, sure this is a nice easy answer.

我们有一个自定义功能区,想要一个打开的按钮共享模板。无法找到一种方法,我可以添加一个打开标准的Word模板页面,从中选择所有模板,但无法解决如何添加直接单击按钮?

We have a custom ribbon and would like a button that opens a shared template. Can't find a way of doing it, I can add one to open the standard Word Templates page where you select from all the templates but can't work out how to add a direct one click button?

谢谢

推荐答案

hi,

在自定义按钮的OnAction回调中,你可以引用这个子:

in the OnAction callback of your custom button you could reference this sub:

Public Sub CreateNew()
    Dim oDoc As Document
    Set oDoc = Documents.Add(Template:="the full name of your template")
End Sub




Lauro


Lauro


这篇关于将Word模板添加到自定义功能区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆