3/18/2008

Unattended installation of a single Office 2007 Language Pack (MUI)

1. Copy the MUI language pack sources into your office source folder (do not replace available items)
2. In the OMUI.XX-YY folder for the specific language customize the config.xml as listed below:

3. Install the Language with the following command, where the setup.exe is the original from the office 2007 source, not from the language pack.

\\server\office\setup.exe /config \\server\office\omui.xx-yy\config.xml

3/02/2008

Office 2007: Automatically restore custom.dic

The next file to restore automatically, when migrating to Office 2007 is the custom.dic file. It contains all user self-defined words.
The Problem is that the directory for .dic files changes in Office 2007. So the following Script can be implemented in your Logon Script.
It creates the neccesary folder UProof, which is only available when Word is started the first time and then copies all .dic files from the old directory into the new UProof folder.

'Restore Custom.dic
Option Explicit

dim objFSO, objShell, objFile, objFolder
dim AppData
dim OldProofPath, NewProofPath


Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject( "WScript.Shell" )

AppData = objShell.ExpandEnvironmentStrings("%APPDATA%")

OldProofPath = Appdata &"\Microsoft\Proof\"
NewProofPath = Appdata &"\Microsoft\UProof"


'*********************************************************************************************'
'First create Folder if the folder doesn't exists
If Not objFSO.FolderExists (NewProofPath) Then
objFSO.CreateFolder NewProofPath
End If
'*********************************************************************************************'

'*********************************************************************************************'
Set objFolder = objFSO.GetFolder(OldProofPath)
'If source folder does not exists...dont copy'
If objFSO.FolderExists(OldProofPath) Then
For Each objFile In objFolder.Files
'Copy all files with DIC extension'
If Right(objFile.Name,3) = "DIC" Then
objFile.Copy NewProofPath & "\" & objFile.Name
End If
Next
End If
'*********************************************************************************************'

Set objFile = Nothing
Set objFSO = Nothing
Set objFolder = Nothing

3/01/2008

Office 2007: Automatically restore AutoText entries from normal.dot

As you maybe know, there seems to be no possibility to automatically restore AutoText entries from previous Office versions to Office 2007.
Microsoft released a Workaround how to restore the AutoText entries from your normal.dot to Office 2007.
The trick is to copy the old normal.dot into one of the following folders:
%APPDATA%\Microsoft\Document Building Blocks\{Language ID}
or
%APPDATA%\Microsoft\Word\STARTUP
See also Microsoft article: http://technet2.microsoft.com/Office/en-us/library/ca7d3d97-6970-45c6-9b05-6a64cf1fbe711033.mspx?mfr=true

I see two problems in this Workaround:
1. I don't trust the STARTUP folder when i only wanna restore the AutoText entries, so i prefer the Document Building Blocks\{Language ID} folder
2. If you want to copy the normal.dot automatically for example with your Logon Script to this folder when the user logs on the first time, you can't copy the file, because the folder Document Building Blocks\{Language ID} only exists when Word is started the first time.

So....i wrote a script, which can be added to your Logonscript
The Script first creates the required folder and then copies the file!


'Restore AutoText entries from normal.dot
Option Explicit

dim objFSO, objShell
dim AppData
dim OldTemplatePath, NewTemplatePath, OldTemplate, NewTemplate
dim LanguageID

LanguageID = "1033"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject( "WScript.Shell" )

AppData = objShell.ExpandEnvironmentStrings("%APPDATA%")

'*********************************************************************************************'
'First create Folder if Word was not started yet'
If Not objFSO.FolderExists (AppData &"\Microsoft\Document Building Blocks\" &LanguageID) Then
objFSO.CreateFolder AppData &"\Microsoft\Document Building Blocks\"
objFSO.CreateFolder AppData &"\Microsoft\Document Building Blocks\" &LanguageID
End If
'*********************************************************************************************'

'*********************************************************************************************'
'Define office template paths here'
'OldTemplate = "normal10.dot" 'If languages match the file is renamed (OfficeXP)
'OldTemplate = "normal11.dot" 'If languages match the file is renamed (Office2003)
OldTemplate = "Normal.dot"
NewTemplate = "AutoText.dot"

'OldTemplatePath = AppData &"\Microsoft\Vorlagen\" german folder
OldTemplatePath = AppData &"\Microsoft\Templates\"

'NewTemplatePath = AppData &"\Microsoft\Word\STARTUP\"
NewTemplatePath = AppData &"\Microsoft\Document Building Blocks\" &LanguageID &"\"
'*********************************************************************************************'


'*********************************************************************************************'
'Determine if the old template exists'
If objFSO.FileExists(OldTemplatePath &OldTemplate) then
'Determine if the new template already exists'
If Not objFSO.FileExists(NewTemplatePath &OldTemplate) then
objFSO.CopyFile OldTemplatePath &OldTemplate, NewTemplatePath &NewTemplate
End If
End If
'*********************************************************************************************'