Share via


Migrate Word, Excel, and PowerPoint files to the 2007 Office system

Applies To: Office Resource Kit

This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.

 

Topic Last Modified: 2016-11-14

You can convert Word, Excel, and PowerPoint files manually, or you can use the OMPM Office File Converter to convert files in bulk. For information about installing OMPM, see Introduction to Office Migration Planning Manager (OMPM).

Convert files in bulk with OMPM

The Office File Converter (OFC) requires that the Microsoft Office Compatibility Pack be installed on the computers that contain the files you want to convert. For more information, see Deploying the Microsoft Office Compatibility Pack.

Before running the Office File Converter, first edit the ofc.ini file to set the appropriate parameters.

To convert files

  1. At a command prompt, navigate to the folder where OFC is installed.

  2. Type:

    ofc <ofc.ini>
    

The parameter for this command is as follows.

Parameter Description

ofc.ini

The location of the ofc.ini file. If no path is specified, OFC looks in the same directory as the executable. Optional.

Note

If you set FileListFolder and FoldersToConvert to the same set of files, the set of files will be converted twice.

Ofc.ini Settings

The following table shows the settings and values in ofc.ini.

Setting Description Possible Values If value is missing If value is not valid

[Run]

Section lists unique ID and description of this conversion. Required.

Conversion stops with error message.

Error: [Run] section heading invalid or missing in OFC.INI.

RunID

Tracking number for the current Conversion. Use this to group Conversions from different computers in the Reporting Tool. Required.

Must be numeric

Conversion stops with error message.

Error: Invalid or missing RunID value in OFC.INI.

Description

Text used to describe the current conversion run. Optional.

Free-form text, truncated to 255 characters

Ignore.

Not applicable.

LogDestinationPath

Location for the log file. Required.

Physical or mapped drive or UNC. For example: c:\Conversion\logs

\\server\vba\logs

Environment variables are also supported.

Conversion stops with error message.

Error: Invalid or missing ‘LogDestinationPath’ value in OFC.INI.

[ConversionOptions]

Section heading for portion of INI file dealing with conversion options. Required, unless there are no conversion options specified in the .ini file.

Conversion stops with error message.

Error: [ConversionOptions] section heading invalid or missing in OFC.INI.

FullUpgradeOnOpen

Enables user to specify that applicable files should be ‘fully upgraded’ on open in respective O12 apps. Optional.

Valid values are

1 –full upgrade

0 –no full upgrade

Default to full upgrade.

Error: ‘FullUpgradeOnOpen’ value in OFC.INI.

DoNotCab

Enables users to disable creating CAB files of log files. Optional.

Valid values are

1 – disables creating CAB files of log files

0 – enables CAB’ing of log files

Conversion stops with error message.

Error: Invalid or missing DoNotCab value in OFC.INI.

MacroControl

Determines if the converter includes any macro projects during conversion. A setting of 1 will cause the OFC to produce macro-free Office 2007 document formats (such as .docx, xlsx, pptx). Macro/VBA code in the original documents will not be migrated. Optional.

Valid values are

1 – disregard VBA on conversion

0 – match macro state of source document.

Defaults to 0.

Error: Invalid ‘MacroControl’ value in OFC.INI.

[FoldersToConvert]

Section lists directories to convert for standalone operation. FileList will be ignored. Optional.

List of folders.

Ignored if input file passed.

Error: [FoldersToConvert] section invalid in OFC.INI.

ConvertSubfolders

If folders are specified, a setting of 1 causes the OFC to traverse subfolders, converting all Word, XL, & PPT documents. Optional.

0 or 1

Defaults to 0.

Error: Invalid ‘ConvertSubfolders’ value in OFC.INI.

[ConversionInfo]

Section lists input file and destination information. Required.

[ConvertedFolders]

Conversion stops with error message.

Error: [ConversionInfo] section heading invalid or missing in OFC.INI.

FileList

Path to FileList. Optional.

Error if not present and [FoldersToConvert] empty.

SourcePathTemplate

Used to determine location of converted file. You can use wildcards, so that an asterisk (*) represents a single segment of the path. Optional.

Any physical or mapped drive or UNC. * or ‘.’

Error: Invalid ‘SourcePathRoot’ value in OFC.INI.

DestinationPathTemplate

Used to determine location of converted file. You can use wildcards, so that an asterisk (*) plus a number represents a single segment of the path. See below for examples. Optional.

Any physical or mapped drive or UNC. * or ‘.’

Error: Invalid ‘DestinationPathRoot’ value in OFC.INI.

The following examples show how you can use the SourcePathTemplate and DestinationPathTemplate settings.

Example 1

In this example, the source files are located in \\userfiles\<user name>\docs\ and the desired output is to \\newserver\docs\<user name>\.

To achieve this result, the SourcePathTemplate and DestinationPathTemplate settings should appear as follows:

SourcePathTemplate = *\*\*\
DestinationPathTemplate = \\newserver\*3\*2

In this case, DestinationPathTemplate assigns a number for each directory segment represented by an asterisk in SourcePathTemplate, so that:

*1 = userfiles

*2 = <user name>

*3 = docs

The following table shows sample source file locations and the resulting locations for converted files with the above settings.

Source Destination
\\userfiles\Cliff\docs\notes.doc
\\newserver\docs\Cliff\notes.docx
\\userfiles\Bob\docs\Personal\Rept1.doc
\\newserver\docs\Bob\Personal\Rept1.docx
\\userfiles\James\docs\New Folder\Schedule.doc
\\newserver\docs\James\New Folder\Schedule.docx

Example 2

In this example, the source files are located in the My Documents folders on users' local computers. The UNC path is \\<computer name>\<drive letter>$\Documents and Settings\<user name>\My Documents\. The desired output is to \\DocServer\docs\<user name>\.

To achieve this result, the SourcePathTemplate and DestinationPathTemplate settings should appear as follows:

SourcePathTemplate = *\*\*\*\*\
DestinationPathTemplate = \\DocServer\*4\

In this case, DestinationPathTemplate assigns a number for each directory segment represented by an asterisk in SourcePathTemplate, so that:

*1 = <computer name> (for example, DESKTOP3)

*2 = <drive letter>$ (for example, c$)

*3 = Documents and Settings

*4 = <user name> (for example, bobsmith)

*5 = My Documents

The following table shows sample source file locations and the resulting locations for converted files with the above settings.

Source Destination
\\DESKTOP3\c$\Documents and Settings\bobsmith\My Documents\Plans.doc
\\DocServer\bobsmith\Plans.docx
LPTP4\d$\Documents and Settings\James\My Documents\Reports\q1.xls
\\DocServer\James\Reports\q1.xlsx

Use VET for extracting versions of Word files

You can use the Version Extraction Tool (VET) included in OMPM to extract versions of files from Word files created in Office 2000, Office XP, and Office 2003 that contain versioning. With this tool, you can use the list of files generated by the OMPM reporting utility.

To extract versions from Word files

  1. At a command prompt, navigate to the folder where VET is installed.

  2. Type:

    vet <OMPM file list directory> <output directory>
    

The parameters for this command are as follows:

Parameter Description

OMPM file list directory

Location of the file list generated by OMPM. Required.

output directory

The directory to which you want to copy all of the versions of the Word files. Required.

For example, to use file lists contained in the c:\ompm\filelists directory and extract versions to the c:\ompm\output directory, you would type:

vet c:\ompm\filelists c:\ompm\output

VET error messages

The following table show the error messages that VET writes both to the log and to the action file.

Error Message Description

IssueID 9090: Could not open document <document name>.

The original document that was flagged as having versions failed to open in Word.

IssueID 9096: Could not get the number of versions for document <document name>.

VET was not able to query the document for the number of versions in the named document. The object model command Versions.Count failed.

IssueID 9091: Could not delete existing version folder <folder path>.

An existing versions folder exists for a specific file, and VET was not able to delete it and could not create a new folder for the new version files.

IssueID 9092: Could not create directory to hold versions <directory name>.

VET was not able to create a directory to hold the versions extracted for a specific document.

IssueID 9093: Failed to access version item.

VET was not able to access the version using the Word object model command Versions.Item(i).

IssueID 9094: Failed to open version <version number> from <file name>.

VET was not able to open the version specified using the Word object model command Versions.Item(i).Open().

IssueID 9095: Failed to save version <version number> from <file name> to <version folder name>.

VET was not able to save the specified version from the document to the versions folder.