I’m about to give up with Word automation from within a .net application and am going to try using Open XML.
It seems I need references to:
using System.IO;
using System.IO.Packaging
using DocumentFormat.OpenXm;l.Packaging;
After a bit of ferreting around I found you need to add a reference to Windows Base to get System.IO.Packaging to appear.
What do you need to reference to get to use DocumentFormat.OpenXml.Packaging? I can’t find it anywhere. I thought you might have to reference something like Microsoft.Office but that is not available either.
In my latest project (ASP.NET MVC3) I’ve referenced these:
As stated previous in comment, you need to download and install Open XML Sdk in order to see the Assembly and reference it.
PS: Take a look at Open XML Powertools project, it’s a library (I guess it’s available via nuget) that will ease a bit your work.