# Public Function GetAsRTItemEx(attachmentName As String) As NotesRichTextItem

**Gets generated PDF document as NotesRichTextItem.**

**Defined in**

`SwPDFDocument`

**Syntax**

`Set notesRichTextItem = swPDFDocument.GetAsRTItemEx("sample.pdf")`

**Parameters**

`AttachmentName`

String. PDF document file name (without path).

PDF file attachment is embedded into the NotesRichTextItem with the given name.

**Return value**

`NotesRichTextItem`

PDF file attachment is embedded into the NotesRichTextItem.
