Ivkata

Hi,

Is it possible ot access and create document's Quick Parts fields programaticaly

Thanks in advance,

Ivo



Re: Visual Studio Tools for Office Office 2007 Quick Parts

Ji Zhou ¨C MSFT

Hi Ivo,

As far as I know, there is no way to customize the fields in Quick Parts. You can only use ActiveDocument.Fields.Add() to add fields into corresponding document. There is no way to add new type of fields which are defined by Microsoft. And if you describe what you want to do, maybe we can find other alternative solutions.

Best Regards

Ji






Re: Visual Studio Tools for Office Office 2007 Quick Parts

Cindy Meister

Hi Ivo

Can you be a bit more specific about what you have in mind Describe your scenario, perhaps We are talking about Word 2007, right






Re: Visual Studio Tools for Office Office 2007 Quick Parts

Ivkata

Hi Ji,

Thanks for the answer.

Currently I am developing Word,Excel,Powerpoint and Outlook Add-Ins with shared business logic.

I need to bind the document to my custom text fields and also to bind document's text to field.

Thanks,

Ivo





Re: Visual Studio Tools for Office Office 2007 Quick Parts

Cindy Meister

Ivkata wrote:

Currently I am developing Word,Excel,Powerpoint and Outlook Add-Ins with shared business logic.

I need to bind the document to my custom text fields and also to bind document's text to field.

OK, by "fields" I think you mean ContentControls. ContentControls can be mapped to a CustomXML part in the document. Your application can change the XML in the CustomXML part and the changes will appear automatically in the ContentControls.

I'm not certain where "Quick Parts" comes into all this, but if you want to add custom Quick Parts, with Content Controls, to a document or a template that is possible. Programmatically, you'd want to do this over the OpenXML file format. You should find more information at OpenXMLDeveloper.org.






Re: Visual Studio Tools for Office Office 2007 Quick Parts

Ji Zhou ¨C MSFT

Hi all,

I think he refer this(we are talking about Word 2007, right ): In the document Ribbon->Insert Tab->Text Group->Quick Parts Gallery->Fields Item. Ivkata, do you just want to add your own field there I searched for a lot, but no luck. I think it maybe not achieved by codes for fields there are encapsulated by Microsoft. There are no interface about that to expose.