cancel
Showing results for 
Search instead for 
Did you mean: 

precompile a document

alessioa_
Champ in-the-making
Champ in-the-making
Hi to all the folks,
someone know if it's possible to precompile a document with data holded, for example, in another document?
For example is it possible, when i add a certain kind of document in a space, to take some data in this document ad use it to draw up part of another document in the same space?

Thanks for help,
Alessio A.
3 REPLIES 3

gavinc
Champ in-the-making
Champ in-the-making
You could achieve this using a Javascript based rule in your space.

Simply apply the script to new items added, get it read the contents from the template doc and set the content of the new document.

alessioa_
Champ in-the-making
Champ in-the-making
Hi gavinc,
excuse me but i didn't understand very well….
I post my specific problem …
I have a customer.doc file with personal data of the customer, for example with this structure:
Name: Mario
Surname: Rossi
Address: via qualunque,27
Telephone Number: 33333333
……………………….
……………………….
……………………….

Now i need to take from this file for example the value of Name, Surname and Address and using this information to fill up the same field in another file, for example invoice.doc
Is it possible to do this? Till now i was able to copy the content from a file to another but not to access a specific information…..
Probably with a simple txt file it is possible but in a doc file?

Thank you very much
Alessio A.

gavinc
Champ in-the-making
Champ in-the-making
Ok, I see what you mean.

I thought you just wanted to copy the content as is from one document to another.

To achieve what you want you'll need to write a custom action ( see http://wiki.alfresco.com/wiki/Custom_Actions ) and leverage the POI libraries to read the content of the document you wish to get the info from and set the properties on the node being added to the repository.