View Full Version : Macro created in Word 2007 not working in 2010
NicoleJones
09-26-2011, 10:37 PM
Hi
I have a document that has been created to override my Normal.dotm, this document "NewNormal.dotm" holds our special styles and formats etc. and sits in the Start Up folder. When it opens on start up, it closes the defaut Normal.dotm and opens the Blank.dotx sitting in our Workgroup files.
In saying all that, this worked perfectly in 2007, however it is not running in 2010 and it does not show any errors.
To troubleshoot my issue I put a message box in my code to see what document was opening at that point and found that in doing this two different things happened....1. In 2007 the message box appeard and simply continued the code when 'Ok' was pressed.... 2. In 2010 no message box appears and the Blank.dotx opens and leaves the Normal.dotm open also
I would be most appreciative if someone could give me some ideas, as I am at a loss.
The attached file will need to be changed to a dotm to test properly.
Thank you kindly
NJ
Janine
09-27-2011, 12:52 AM
:cloud9: You need to put in a 2010 xml part.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
That may resolve your problem. Also convert .gif to .png or .jpg as it does not insert in 2010 xml.
NicoleJones
09-27-2011, 02:07 PM
Thank you for your help Janine
I changed the xml code to 2010 like you suggest which when opening word for the first time works perfectly, however, when I open a link from Outlook, as an example, when Word is not already open I have a Blank.docx also open with it.
Any ideas?
Thx again
NJ
NicoleJones
09-27-2011, 02:29 PM
This format does not allow for the uploading of a dotm file, the document previously attached will need to be manually changed. :)
Paul_Hossler
09-27-2011, 07:42 PM
Using 2007 XML should not be an issue unless you're using some of the new 2010 features.
Might be that you need to add it to a Trusted Location, or make a new one
Paul
NicoleJones
09-27-2011, 08:17 PM
Thank you Paul, there doesnt seem to be any issue with the code running, do you know if there has been a change to the way Word loads documents? I think that the 'start up' template is the last one to load and therefore throwing all of the code out.
Janine
09-28-2011, 12:00 AM
Hi again,
I'm sorry :cloud9: I was on.
You use this as a replacement Normal.dotm but that resides in Users Templates not STARTUP.
Why not just have it as an addin in STARTUP and let it load as "Firm.dotm" or whatever?
Why load as Normal.dotm - it will be replaced if it corrupts anyway?
I mention the .gif because your .gif does not load in my STARTUP folder it throws an error. Plus all the macros etc aer not in the .dotm (a few) so it has macro security errors on load.
STARTUP/User Templates are usually default trusted locations.
Just a suggestion and letting you know what happens when I load it.
Janine
Janine
09-28-2011, 12:13 AM
:cloud9: I attach the .docm (change to .dotm). I have placed screenshots of the .gif load image and the attempt to call your blank document - of course my path has no such document. But except for the .gif and document not being available I get no other errors except no macros load. The commands insert.
Also the 2010 part is inserted just because it is better in than out.
So what other issue are you having?
Janine
Paul_Hossler
09-28-2011, 05:16 PM
I see the onAction callbacks in the docm, but none of the code is in the docm
<menu id="mnuTemplate" imageMso= "ReviewTrackChanges" size = "large" label="Templates">
<button id="butCorrespondence" label="Correspondence" onAction="CallbackCorrespondence" />
<button id="butAgenda" label="Meeting Agenda" onAction="CallbackAgenda" />
<button id="butMinutes" label="Meeting Minutes" onAction="CallbackMinutes" />
<button id="butFileNote" label="File Note" onAction="CallbackFileNote" />
<button id="butReport" label="Report" onAction="CallbackReport" />
<button id="butResume" label="Resume" onAction="CallbackResume" />
</menu>
Paul
chensi
09-29-2011, 06:19 PM
HELLO .NICE TO MEET YOU ..MY NAME IS chensi .welcome,i come here first time
_________________________________________________________________
I live my life in colour and see in soundMake sure you are heard!
buy wow gold (http://www.wly.com/)Buy Runescape Gold (http://wly.com/gold/Runescape/)Buy RS Gold (http://www.zyy.com/RS-Gold/)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.