source_full_name property

FieldInclude.source_full_name property

Gets or sets the location of the document.

@property
def source_full_name(self) -> str:
    ...

@source_full_name.setter
def source_full_name(self, value: str):
    ...

Examples

Shows how to create an INCLUDE field, and set its properties.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)
# We can use an INCLUDE field to import a portion of another document in the local file system.
# The bookmark from the other document that we reference with this field contains this imported portion.
field = builder.insert_field(aw.fields.FieldType.FIELD_INCLUDE, True).as_field_include()
field.source_full_name = MY_DIR + 'Bookmarks.docx'
field.bookmark_name = 'MyBookmark1'
field.lock_fields = False
field.text_converter = 'Microsoft Word'
self.assertRegex(field.get_field_code(), ' INCLUDE .* MyBookmark1 \\\\c "Microsoft Word"')
doc.update_fields()
doc.save(ARTIFACTS_DIR + 'Field.field_include.docx')

See Also