[OfficeUtils] Multiple pages word

Forge Component
(26)
Published on 2017-04-26 by Elena Novozhilova
26 votes
Published on 2017-04-26 by Elena Novozhilova

Hello, i need some help using office utils. I have a list of users and i need to export the users data to word, but i want it in different word pages. User1Data->Page1, User2Data->Page2, etc...

How can i do that?

Thank you

Hi Daniel,


I don't know if OfficeUtils is the right component for what you are trying to do, but i'll try to help.

If the objective is to print the result to paper, you'll be better off using the excel functions and experimenting. 


The word functions use a template with placeholders that you can change the values of with the function provided. Normally you have to create your own template with your own placeholders.

Can you explain in more detail what you want? If i know the problems, maybe i can be more specific.


Hope it helps.

Hi,

Thanks for your answer. At this moment, i have my word template with some placeholders and i'm using that to print the information of a specific user. Right now, i have the option to print multiple information of diferent users but i want that information in diferent pages like Page1 -> User1 Information, Page2 -> User2Information, etc

In this file i show what's hapening but what i really want is split user information by pages.

Thank you

Hi again Daniel,


Like i said before, i doubt you'll be able to do what you want simply using word.
Please try and use excel, you can assign a sheet for each user.



With a local Variable ExcelFile, assign the sheet name that you want, can be the user name or another thing;
You can use sheetoclone to use a template;
Row and Column are the X and Y positions of the excel cell that you want your values;
Value is the text to be applied on the cell;
The last one is to be applied or not on a template.

Please see the sample espace, it's very helpful.

Either way i'm here to help.

Hi,


Thank you for your help again. The problem is : I have to use word, it cant be in excel.


Thank you

Hi Daniel,


Unless you want to make every page template for the n number of pages that you want (that won't be dinamic at all), this is not the extention for you.
There maybe others in the forge that you can try.


Sorry if i couldn't be of more help.

Hi Daniel,

Can you print your results in pdf? if so, why don't you use something like simple reports component. You may have a webblock with the info that you want to show inside a list of users. I think that it may break at the beginning of each user.

Hi,

No, i can not print the results in pdf, it has to be in word. I'll try another solution. Thanks for your help.

Hi Daniel,

I created an MSWord manipulation library a while ago as I needed to generate and manipulate word documents.

The latest version can add page breaks.  If it helps, it is available here https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=4422

Kind regards,

Stuart

Stuart Harris wrote:

Hi Daniel,

I created an MSWord manipulation library a while ago as I needed to generate and manipulate word documents.

The latest version can add page breaks.  If it helps, it is available here https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=4422

Kind regards,

Stuart

Hi Stuart, 

When i publish youraplication, it tells me that it has unbroken refferences.

"Publish aborted
New broken or missing references found for producer module 'DocX_Extension'. Please review them and republish."

Thank you


Solution

Daniel Figueira wrote:

Stuart Harris wrote:

Hi Daniel,

I created an MSWord manipulation library a while ago as I needed to generate and manipulate word documents.

The latest version can add page breaks.  If it helps, it is available here https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=4422

Kind regards,

Stuart

Hi Stuart, 

When i publish youraplication, it tells me that it has unbroken refferences.

"Publish aborted
New broken or missing references found for producer module 'DocX_Extension'. Please review them and republish."

Thank you


Thanks Daniel, oops! I uploaded the oml which didn't contain the extension, instead of the oap.  All fixed now, you can install from the forge successfully now.


Solution