Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Conversion of Word 2003 Templates to Word 2007
I have a number of personalized templates in Word 2003 (primarily Avery
binder spine inserts) that I need to update to Word 2007 templates. It appears that the only way to do that is to open each one individually and save in 2007 format. That is amazingly time consuming. Any other suggestions? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Conversion of Word 2003 Templates to Word 2007
BirdMan wrote:
I have a number of personalized templates in Word 2003 (primarily Avery binder spine inserts) that I need to update to Word 2007 templates. It appears that the only way to do that is to open each one individually and save in 2007 format. That is amazingly time consuming. Any other suggestions? How about automating it with a macro? See http://www.gmayor.com/installing_macro.htm if needed. Sub ConvertTemplates() ' Convert every Word 97-2003 format template in the ' User Templates folder to Word 2007 .dotx format. ' Note: ALL macros will be discarded silently! If you ' need to keep the macros, change the "x" in the ' assignment of myNewFile to "m" and change the FileFormat ' argument in the SaveAs command from wdFormatXMLTemplate ' to wdFormatXMLTemplateMacroEnabled. Dim aTemplate As Document Dim myFile As String Dim myNewFile As String Dim PathToUse As String Dim resp As Integer ' included to avoid compile error if run in Word 2003 or earlier: Const wdFormatXMLTemplate = 14 If Val(Application.Version) 12 Then MsgBox Prompt:="This macro requires Word 2007." Exit Sub End If resp = MsgBox(Prompt:="If there are any *.dotx templates in " & _ "the User Templates folder," & vbCr & "move them out so they " & _ "won't be overwritten." & vbCr & vbCr & "Proceed?", _ Buttons:=vbYesNo, Title:="Template Converter") If resp = vbNo Then Exit Sub PathToUse = Options.DefaultFilePath(wdUserTemplatesPath) & "\" myFile = Dir$(PathToUse & "*.dot") While myFile "" ' myFile will also pick up dotx and dotm files, so avoid them If LCase(Right$(myFile, 3)) = "dot" Then ' suppress auto macros and save dialogs WordBasic.DisableAutoMacros 1 Application.DisplayAlerts = wdAlertsNone ' Open a copy of the template as a new template Set aTemplate = Documents.Add(Template:=PathToUse & myFile, _ NewTemplate:=True) ' Change the extension -- NOT macro-enabled template myNewFile = myFile & "x" ' Convert to XML format and save it, then close With aTemplate .Convert .SaveAs FileName:=PathToUse & myNewFile, _ FileFormat:=wdFormatXMLTemplate .Close End With End If 'Next file in folder myFile = Dir$() Wend ' Restore normal functions WordBasic.DisableAutoMacros 0 Application.DisplayAlerts = wdAlertsAll End Sub -- 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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conversion from Office 2003 to 2007 | Page Layout | |||
Templates/Macros/Autotext in Word 2003 and Word 2007 | Microsoft Word Help | |||
Using word 2003 invoice templates in word 2007 | New Users | |||
How do I transfer WORD 2003 Templates for use in WORD 2007? | Microsoft Word Help | |||
Mailmerge conversion 2003-2007 | Mailmerge |