Answered Office 2010 Customization Tool & Automation Query

  • jueves, 12 de julio de 2012 9:21
     
     

    Hi Guys,

    After a bit of advice with regards to automation of Office 2003 - Office 2010 Deployment.

    I have sucessfully used the Office Customization Tool (OCT) and configured a few options - including activation, default file formats & Normal.dot migration for Word. However - i am running into some issues with the hot topic of Macros, AutoText & Auto Complete.

    This link appears to show me what i need

    http://office.microsoft.com/en-us/word-help/add-autotext-in-word-HA101827969.aspx

    Is there a way i can use the OCT to automate this (or if not the OCT, is there a script i can run post installation to migrate the AutoText into Building blocks, and AutoFill into the new Normal.dotm etc ?

    Would appreciate any help as we have a large deployment of this lined up and the manual migration is just not an option really

    Thank you in advance!

Todas las respuestas

  • jueves, 12 de julio de 2012 10:12
     
     

    Hi,

    this article (for Office2007, but) may help:
    http://technet.microsoft.com/en-us/library/cc179177(v=office.12).aspx


    Don

  • jueves, 12 de julio de 2012 12:07
     
     

    Hi Don,

    Thank you for the response - i've had a quick look at the article, but again it requires some interaction per machine, unfortunately we dont have the resources to do this. I was hoping the OCT would have the option to migrate AutoText etc for us. Has anyone scripted similar?

    Thanks again for your help

  • martes, 17 de julio de 2012 8:04
    Moderador
     
     Respondida

    Hi,

    Check if this would help.

    Following is a VBScript created based on the article:
    See Migrate Word 2003 AutoText entries into Word 2010
    http://office.microsoft.com/en-us/word-help/add-autotext-in-word-HA101827969.aspx

    Instructions:
    1. Copy the code below to Notepad, and then save as a .vbs file.
    2. Double-click the .vbs file.

    ' To save the full path of %APPDATA%.
    Dim strPathAppData
    ' To save the full path of the Normall11.dot file.
    Dim strPathTemplate

    ' The common path name of the Normal11.dot file.
    Const PATH_TEMPLATE = "Microsoft\Templates\Normal11.dot"

    On Error Resume Next

    ' Get the full path of %APPDATA%.
    strPathAppData = CreateObject("WScript.Shell").SpecialFolders("AppData")

    If Right(strPathAppData, 1) <> "\" Then strPathAppData = strPathAppData & "\"

    ' Get the full path of the Normall11.dot file.
    strPathTemplate = strPathAppData & PATH_TEMPLATE

    If Not CreateObject("Scripting.FileSystemObject").FileExists(strPathTemplate) Then
                    WScript.Echo "Coundn't find the Normal11.dot file."
                    WScript.Quit
    End If

    Dim wdDoc
    Dim vntWordVer

    ' The common startup path name of Word.
    Const PATH_WORDSTARTUP ="Microsoft\Word\STARTUP"
    ' Document format for Word 2010 (Macro-Enabled).
    Const wdFormatXMLDocumentMacroEnabled = 13

    Set wdDoc = GetObject(strPathTemplate)

    vntWordVer = CInt(wdDoc.Application.Version)

    ' /* If Word 2010. */
    If vntWordVer = 14 Then
                    ' /* If no error. */
                    If Err.Number = 0 Then
                                    With wdDoc
                                                    .SaveAs2 strPathAppData & PATH_WORDSTARTUP & _
                                                                                    "\AutoText", wdFormatXMLDocumentMacroEnabled, , _
                                                                                    , , , , , , , , , , , , , vntWordVer
                                                    .Close
                                                    .Application.Quit
                                    End With
                                   
                                    WScript.Echo "Execution succeed."
                    Else
                                    WScript.Echo "Execution failed."
                    End If
    Else
                    WScript.Echo "This script can be only run on Word 2010."
    End If


    Max Meng

    TechNet Community Support