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.
  1. 'Restore Custom.dic  
  2. Option Explicit  
  3.   
  4. dim objFSO, objShell, objFile, objFolder  
  5. dim AppData  
  6. dim OldProofPath, NewProofPath  
  7.   
  8.   
  9. Set objFSO    = CreateObject("Scripting.FileSystemObject")  
  10. Set objShell  = CreateObject( "WScript.Shell" )  
  11.   
  12. AppData = objShell.ExpandEnvironmentStrings("%APPDATA%")  
  13.   
  14. OldProofPath = Appdata &"\Microsoft\Proof\"  
  15. NewProofPath = Appdata &"\Microsoft\UProof"  
  16.   
  17.   
  18. '*********************************************************************************************'  
  19. 'First create Folder if the folder doesn't exists  
  20. If Not objFSO.FolderExists (NewProofPath) Then  
  21.   objFSO.CreateFolder NewProofPath  
  22. End If  
  23. '*********************************************************************************************'  
  24.   
  25. '*********************************************************************************************'  
  26. Set objFolder = objFSO.GetFolder(OldProofPath)  
  27. 'If source folder does not exists...dont copy'  
  28. If objFSO.FolderExists(OldProofPath) Then  
  29.   For Each objFile In objFolder.Files   
  30.     'Copy all files with DIC extension'  
  31.     If Right(objFile.Name,3) = "DIC" Then  
  32.       objFile.Copy NewProofPath & "\" & objFile.Name  
  33.     End If  
  34.   Next  
  35. End If  
  36. '*********************************************************************************************'  
  37.   
  38. Set objFile = Nothing  
  39. Set objFSO = Nothing  
  40. 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!

  1. 'Restore AutoText entries from normal.dot  
  2. Option Explicit  
  3.   
  4. dim objFSO, objShell  
  5. dim AppData  
  6. dim OldTemplatePath, NewTemplatePath, OldTemplate, NewTemplate  
  7. dim LanguageID  
  8.   
  9. LanguageID = "1033"  
  10.   
  11. Set objFSO    = CreateObject("Scripting.FileSystemObject")  
  12. Set objShell  = CreateObject( "WScript.Shell" )  
  13.   
  14. AppData = objShell.ExpandEnvironmentStrings("%APPDATA%")  
  15.   
  16. '*********************************************************************************************'  
  17. 'First create Folder if Word was not started yet'  
  18. If Not objFSO.FolderExists (AppData &"\Microsoft\Document Building Blocks\"  &LanguageID) Then  
  19.   objFSO.CreateFolder AppData &"\Microsoft\Document Building Blocks\"  
  20.   objFSO.CreateFolder AppData &"\Microsoft\Document Building Blocks\"  &LanguageID  
  21. End If  
  22. '*********************************************************************************************'  
  23.   
  24. '*********************************************************************************************'  
  25. 'Define office template paths here'  
  26. 'OldTemplate = "normal10.dot" 'If languages match the file is renamed (OfficeXP)  
  27. 'OldTemplate = "normal11.dot" 'If languages match the file is renamed (Office2003)  
  28. OldTemplate = "Normal.dot"  
  29. NewTemplate = "AutoText.dot"  
  30.   
  31. 'OldTemplatePath = AppData &"\Microsoft\Vorlagen\"  german folder  
  32. OldTemplatePath = AppData &"\Microsoft\Templates\"  
  33.   
  34. 'NewTemplatePath = AppData &"\Microsoft\Word\STARTUP\"  
  35. NewTemplatePath = AppData &"\Microsoft\Document Building Blocks\"  &LanguageID &"\"  
  36. '*********************************************************************************************'  
  37.   
  38.   
  39. '*********************************************************************************************'  
  40. 'Determine if the old template exists'  
  41. If objFSO.FileExists(OldTemplatePath &OldTemplate) then  
  42.   'Determine if the new template already exists'  
  43.   If Not objFSO.FileExists(NewTemplatePath &OldTemplate) then  
  44.     objFSO.CopyFile OldTemplatePath &OldTemplate, NewTemplatePath &NewTemplate  
  45.   End If  
  46. End If  
  47. '*********************************************************************************************'