Question

Global Template Prompt to Save on Exit

Asked by: LPurvis

Having created a custom Global Template and added it to the startup folder in Word it is loaded correctly - and performs its actions well (including some toolbar manipulatioin and several macros firing a range of vba - the toolbar altered belongs to this template - none of the others are touched).

There's a reference to the Office object library and several withevents declarations are made - to capture actions on this custom toolbar.
Buttons on it are enabled and disabled.  But the controls are all permanent - and not created or any other new properties assigned (other than catching their being clicked and enabling/disabling)

Whenever the Word instance is closed (and hence the template is closed) there is a prompt to "Save Changes to XXXX.dot".  (Where that's the template name)

This can't be allowed.  It's hugely unprofessional.
The Template seems fairly large - with a few user forms too (around 310KB) and so it takes two or three seconds to save (so I'd rather not have to constantly save it during routine tasks as a solution - but I'm open to suggestions :-)
I've looked for an event of the application object to sav before closing - but they don't seem to fire before this request.

Thanks for any thoughts.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-09-10 at 02:41:54ID21556879
Tags

save

,

word

,

template

,

prompt

,

global

Topic

Microsoft Word

Participating Experts
1
Points
500
Comments
5

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. VBA Excel Global Template
    I understand that Excel doesn't have an equivalent to Word's Normal.dot. This is what I'm trying to do: I'm trying to intercept all of the FileOpen, FileNew, FileSave ... commands. Instead of the user getting the normal Save, Open.. dialog boxes, I want them to see my User...
  2. Global Macro is not always global?
    I need to distribute my macro gMacro into 50 client computers. And I want to make it a global macro so that I can access this macro in different situations. Based on the Word documentation I have at hand, I put my gMacro into a template file named aat.dot. Then I put this aa...
  3. Calling a global template's subroutine from another global t…
    I have 2 Word templates saved to the Word startup folder, so they are both global templates. In the VBA code for the first global template, I'm trying to call a subroutine from the second global template, but Word keeps telling me it can't find the procedure. Anyone know how ...
  4. Toolbar button to open template
    In Word 2003, I have a client that would like to create a toolbar icon that will open a workgroup template. They have a collection of templates on their "S drive". They can open the template via File > New, and then selecting the option On My Computer under the h...
  5. Global template macro after document open
    below is the macro code for a template stored in the startup folder. My probem is on certin already set templates I get the error message "This Command is not available because no document is open" Is there a way arround this? Or is there a way to run this macro ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: GrahamSkanPosted on 2005-09-10 at 06:14:49ID: 14855990

It's not clear if the template is being modified by design (toolbar manipulation?). If so, then you know where and you can save it (or set its Saved property to true) when that happens.

 

by: LPurvisPosted on 2005-09-11 at 05:37:19ID: 14858830

Yes - the template's toolbar is being intentionally modified. (Really just enabling and disabling the buttons on it)

Strangely - although the template is added to Word's startup folder, when Word is running - it doesn't seem to be able to referred to in code.  (Hence the .Saved) isn't working.
And then on viewing in Templates & Add-Ins it isn't there in the list.  And yet it's toolbar is right there for all to see - and the code from the toolbar runs if you click it.

And yet it asks to save changes to it as Word exits!

So I'm a bit stuck.
How am I supposed to save it if I can't refer to it.

Is there some other step I should take other than putting it in the Startup folder?

Thanks

 

by: GrahamSkanPosted on 2005-09-11 at 08:46:18ID: 14859469

I have been testing with a simple template in Word 2000.

It has a custom toolbar with a button that runs a macro. It is in the StartUp folder.
I open Word, and the button is visible. Using the Customize dialog, I drag the button off the bar.
I now try to close Word and I am asked if I want to save the template.That matches your situation, I believe.

I have another macro so:

Sub SaveTemplate()
    Application.Templates(1).Saved = True
End Sub

If I run that, Word closes without asking if I want to save the template.

I can see the template in the Templates and Add-ins.

What is the value of Application.Templates.Count? Also, can you see the Template project in the VBA IDE?

Also, I am in the middle of rebuilding my system and will re-test under Word 2003 when I have it installed.

 

by: LPurvisPosted on 2005-09-11 at 09:41:05ID: 14859668

Well - whether I see it in the physical list or not (it's intermittant even now) - I've tried looping through them - and there it is.  (I've tried that before - am worried that it's there now but wasn't before, but hey).

So iterating through the collection - tested for the name of the one I want - and boom, set to Saved and no message.

That looks like it for now!

Thanks for your thoughts (and efforts replicating the situation!  That you didn't get the same problems gave me the determination to persevere with the collection :-).

 

by: GrahamSkanPosted on 2005-09-11 at 09:58:48ID: 14859729

Thanks for that feedback and the grade.

Yes, it does help to know what normally works.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...