Copying Paragraph and Portion in PPTX

Copying a Paragraph

The properties of the Paragraph can be accessed in ParagraphFormat instance of Pargraph class. We need to copy all the properties of source paragraph to target paragraph. In the following example, the CopyParagraph method is shared that takes paragraph to be copied as an argument. It copies all the properties of source paragraph to a temporary paragraph and return the same. The target paragraph gets the copied values.

Copying a Portion

The properties of the Portion can be accessed in PortionFormat instance of Portion class. We need to copy all the properties of source portion to target portion . In the following example, the CopyPortion method is shared that takes portion to be copied as an argument. It copies all the properties of source portion to a temporary portion and return the same. The target portion gets the copied values.