Key Value Pairs- putting keys on document: How I can hide this information on worddocument?


#1

Example:

Worddocument: bookmark1

bookmark2

bookmark3

Data base: 1, car

2, track

3, jet

Now the workflow:

1. Aspose puts on each bookmark a combo mit filled in : 1, car 2, track, 3, jet

2. The user makes the choices ex.: combo1 on bookmark1 ----> 3, jet

combo2 on bookmark2 ----> 1, car

combo3 on bookmark3 ----> 1, car

3. The user is happy and saves the document.

Now the round trip:

The Data has changed on number 1 is cabriolet instead car.

Data base: 1, cabriolet

2, track

3, jet

Aspose:

1. Scans over all combos (combo1, combo2, combo3), reads the values, reads the IDs and replace with

new IDs and Texts.

Question: How can I hide the IDs on the word document, I want the ID only to reference the items in a later change (to be

synchron with newest values). On the worddocument should be both information: 1, cabriolet

but only visible: cabriolet

regards

Karl


#2

You should probably create the template document in MS Word, insert comboboxes where you need them.

Then you can use Aspose.Word FormFields and FormField classes to access and modify comboboxes and their values programmatically. So you can load your database values into the document.

Note you cannot use Aspose.Word to present the document to the user. Aspose.Word is a non-graphical component. You need the user to open the document in MS Word.

When the user selected values in the comboboxes, you can use Aspose.Word again to open the document and retrieve values from FormField objects and store in the database.

Comboboxes in a Word document can only store one value, they cannot store key-value pairs. If you need to store a map of key-value pairs somewhere hidden in a document you can use Document.Variables or Document.CustomDocumentProperties collections.