Use PowerShell to convert old Office files into new
formats
Move files into SharePoint 2
A SharePoint tutorial by Peter Kalmstrom
Peter
Kalmstrom, CEO of kalmstrom.com Business Solutions and Microsoft
certified SharePoint specialist, has in an assignment prepared
a move of millions of Office files into SharePoint.
In that process he also converted old files to the modern,
XML based file formats with the help of a PowerShell script,
something that is shown in the demo below.
Modern file formats
With
Office 2007 Microsoft introduced new file formats with an
x or m addition to the suffix. These formats are based on
Open XML, which have now become a standard. Such modern
file formats are .docx, .xlsx and .pptx.
These are some benefits of the modern file formats:
- They save space, as they are automatically compressed
with a .zip technique.
- They are more secure as files with the x suffix
don't allow macros.
- They separate different data components from each
other, so that files can be opened even if a component
- for example a chart - is damaged.
- As they all build on Open XML you can unlock information
in existing systems and use it in Office programs, and
information created in Office can be used by other business
applications.
Links will be broken
There is also an important drawback to consider, as always
when you convert files to other formats: links with the
old file extensions will not work when the suffix has been
changed.
PowerShell script
The actual conversion can be made manually, by saving each
file in the new format or with the
Microsoft Migration Manager.
Peter shows a third way, a PowerShell script that opens
the files and saves them as new files in a modern format.
In the demo below he explains the script and shows how it
works.
The PowerShell script gives Peter a better control over
the process than the Microsoft tool does, and it has the
advantage of keeping the change dates of the original files.
That way you can see when the file with the old extension
was changed even though you have converted it.
To consider
Before you start converting old Office files there are some
things you should check:
- Office language packs must be installed.
- The save format must be set to the new one for each
Office program.
- The folder in which you are converting files must
be added to the trusted locations.
- You must disable protected view on the files you
will convert.
|