Custom Document Properties in MS-Word

I’m trying (with the help of Automation) to create and fill the custom document properties in a Wordfile. Here’s where the problem starts, according to the MSDN Library you have to use something like this: “Application.ActivePresentation.CustomDocumentProperties.Add” but when I tried to recreate this in Navision Financial NL2.50 I got a compile-error saying that the function ADD was unknown. Does anyone have a suggestion?

Have you Create an Object for Each Level ?? Say in Excel App Book Sheet Charts Chart would be 5 seperate Objects each having different Properties/Functions Mr David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk

I got until App Documents Document But I can’t seem to find an object for the Custom Document Properties.

The cause of this problem lies in the fact that the DocumentProperties and DocumentProperty classes are members of the Microsoft Office 8.0 Object Library, not of the Microsoft Word 8.0 Object Library. Since the datatype of WordDoc.CustomDocumentProperties is Object (a generic OLE object), i.s.o. DocumentProperties, the ‘Add’ method could not be found. Much to my surprise, I found the DocumentProperties and DocumentProperty classes defined in the Microsoft Office 8.0 Object Library, but these classes are for some reason not visible to C/SIDE. To view the definitions of the classes mentioned above, open Microsoft Word, press Alt+F11 to activate the VBA IDE, select References… from the Tools menu, and (if necessary) add Microsoft Office 8.0 Object Library. In the Object Browser (F2!), select the Office Library. You will see that, besides the classes visible to C/SIDE, this object library contains (among others) your DocumentProperties and DocumentProperty classes. One problem remains: I don’t have a clue how to use these classes form C/SIDE!.. Anyone?

Well, we have made a solution… We’ve made a dll wich we could use via automation, so we made a way around c-side which we can use to send our instance of the document to.