Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Jul 17, 2019 7:32 am

Hello,
how can I add somthing to a paragraph without setting a name for the paragraph?
example:

Dim ParEndPage As Paragraph = SectionExtra.AddParagraph()
could be also written as:
SectionExtra.AddParagraph(), so without giving a name to the paragraph. Correct?

But if then I want to add a page break to this last paragraph, how can I do?
if the paragragh has a same I would write:
ParEndPage.AppendBreak(BreakType.PageBreak)

But if the paragraph has no name, how can I select the last paragraph I created (I mean, to get the index or to refer to it without the name)?

I would add new paragraph without setting a name because I should replicate it page by page.

thank you,
Paola

paolagumi
 
Posts: 81
Joined: Tue Apr 21, 2015 11:32 am

Wed Jul 17, 2019 8:32 am

Dear Paola,

Thanks for your inquiry.
Please use the code below to find the last paragraph you created and append page break. If there is any question, please feel free to write back.
Code: Select all
SectionExtra.AddParagraph()
TryCast(SectionExtra.Body.LastChild, Paragraph).AppendBreak(BreakType.PageBreak)
Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Wed Jul 17, 2019 9:03 am

Dear Nina,

thank you very much, it works perfectly.

kind regards,
Paola

paolagumi
 
Posts: 81
Joined: Tue Apr 21, 2015 11:32 am

Wed Jul 17, 2019 9:13 am

Hi,

You are welcome.
If there is anything we can do for you in the future, please do not hesitate to contact us.
Wish you all the best.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.Doc

cron