I’ve done a bit of WinWord automation and came across different locations for the API:
New Style:
- Word 2013: Documents Object (Word) – http://msdn.microsoft.com/en-us/library/office/ff840891(v=office.15).aspx
- Word 2010: Documents Collection Object (Word) – http://msdn.microsoft.com/en-us/library/office/ff840891(v=office.14).aspx
Old Style:
- Word 2010: Documents Interface (Microsoft.Office.Interop.Word) – http://msdn.microsoft.com/en-us/library/ms263641(v=office.14)
- Word 2003: Documents Interface (Microsoft.Office.Interop.Word) – http://msdn.microsoft.com/en-us/library/ms263641(v=office.11)
Fun fact: there is no Old Style Word 2007 documentation any more. You might expect it at http://msdn.microsoft.com/en-us/library/ms263641(v=office.12) but it is not there.
Not so fun fact (and the reason I was looking for the Documents documentation), is because of this big bug ONLY in Office 2010 (it does not occur in Office 2000 .. 2007, and is fixed in 2013): The WordMeister » Bug Word 2010: Documents collection is not correctly maintained.
The only workaround is to run an Office Add-in, or VBA Macro. Both not feasible for external clients.
–jeroen
Filed under: Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Office, Office 2007, Office 2010, Office 2013, Office Automation, Office VBA, Power User, Scripting, Software Development, VBScript