How extcerpt the content from one document to another
Asked by Mane Zakaryan:

Hello,

I have a document and in that document I have several parts that I need to excerp and include in another document.

I try to use the macro ''Extrait''. The needed part of the document I put in the macro ''Extrait'' and in another document I use the macro ''Inclusion d'extrait''.

But this case is working only for the first ''Extrat'' part. It is taking the information only of the first ''Extrait'' in the order.

To be clear, I will give an exemple.

In the document 1 I have following lines :

Line 1  
Line 2  
Line 3  
Line 4

I need to excerpt the Line 2 and Line 4. I put them in the macro ''Extrait'' (2 different extraits).

Now, I have document 2 and in that document I want to have the Line 2 and Line 4 and I use the macro ''Inclusion'' (2 times). It gives me the result :

Line 2  
Line 2

It doesn't understand that there is another part also to Extrait.

How I can manage it ? Can someone help me ?

![Screenshot_1.png](https://community.atlassian.com/t5/image/serverpage/image-id/151792iE02D233737C24FA5/image-size/large?v=v2&px=999 "Screenshot_1.png")![Screenshot_2.png](https://community.atlassian.com/t5/image/serverpage/image-id/151791i3EAF5DF50D012346/image-size/large?v=v2&px=999 "Screenshot_2.png")


Answers:
author: Matt Reiner [K15t]
body: Hi [@Mane Zakaryan](/t5/user/viewprofilepage/user-id/4480932)

You could try [the Inclusion Library technique](https://www.k15t.com/rock-the-docs/documentation-guide/content-reuse/organize-your-reusable-content), which Atlassian, and my team, utilize for reusing content within Confluence.

Doing it this way, you would create pages within another part of Confluence, each containing the text for your "Line 1", "Line 2", etc. Then, you can use the Include Page macro to bring that content directly onto the pages where you want it.

comments: author: Mane Zakaryan
body: Hello Matt Reiner, thank you for your answer.

Please, can you tell me if this Inclusion Library Technique has an option to share a part of the content with another user who doesn't have an access to the original document, but can see that shared part in another document?

For example, I have a Documen_A and User_1 and User_2.

User_1 has full access to Document_A, but the user_2 can't see the document_A.

In this case, can the User_1 create another Document_B and insert one part of the Docuemnt_A (maybe by using a macro) so the User_2 can see that included information in the Document_B but the User_2 still does not have an access to the original Document_A.

The plugin of MultiExcerpt was perfect for my case, but I can't manage the permissions, because today if I remove access of one user from the original document and if there are some parts of that document used in another document if the user doesn't have access to the original one, he can't see that included parts.

I did research I found this macro [https://marketplace.atlassian.com/apps/130/macro-security-for-confluence?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/130/macro-security-for-confluence?hosting=server&tab=overview) but I don?t know if it will be helpful I haven't installed it for a test yet.

Do you have some ideas?


author: Matt Reiner [K15t]
body: Hey [@Mane Zakaryan](/t5/user/viewprofilepage/user-id/4480932)

I can't think of a way to make this work, although, you're not the only one to want to do this.

Confluence is built with a solid permissions scheme, which page inclusion respects. So if User_B doesn't have access to Document_A, it won't show up using an include macro. This is because Confluence does a permissions check before displaying it.

Sorry, I wish I had a different answer...


author: Mane Zakaryan
body: I just found out that it is possible to do with MultiExcerpt Macros.

But I don't know how to insert it as I found only the payed version of it - 129 $.

Is that possible to have for free and how ?

Do you have some ideas ?

Thank you.


Tags: new-to-confluence