Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Is the Open Document a Template

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Tissington - 16 Feb 2007 19:39 GMT
I need to display a custom ribbon only if the user is creating a template.

How do I know if the Active Document is a template (need to know for Word
2003 and 2007) ?
Jay Freedman - 16 Feb 2007 22:04 GMT
> I need to display a custom ribbon only if the user is creating a
> template.
> How do I know if the Active Document is a template (need to know for
> Word 2003 and 2007) ?

In VBA -- definitely in Word 2003, and probably also in 2007 although I
won't be able to check for a few hours -- you can look at the value of
ActiveDocument.Type. It could have values of wdTypeDocument (a constant
equal to 0) or wdTypeTemplate ( = 1) or wdTypeFrameset ( = 2).

I don't know whether there's some "native" way of doing this in RibbonX, or
if you'll have to write a callback procedure in VBA. Look at
http://www.pschmid.net/office2007/ribbonx/index.php for help with this.

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Michael Tissington - 19 Feb 2007 09:16 GMT
Thanks, just what I was looking for.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.