---
title: "ค้นหาคุณสมบัติของฟิลด์ใน Python"
---


ช่องที่แทรกโดยใช้ [DocumentBuilder](https://reference.aspose.com/words/python-net/aspose.words/documentbuilder/).[insert_field](https://reference.aspose.com/words/python-net/aspose.words/documentbuilder/insert_field/) จะส่งกลับออบเจ็กต์ [Field](https://reference.aspose.com/words/python-net/aspose.words.fields/field/) นี่คือคลาสส่วนหน้าที่ให้วิธีการที่เป็นประโยชน์ในการค้นหาคุณสมบัติบางอย่างของฟิลด์อย่างรวดเร็ว

ตัวอย่างโค้ดต่อไปนี้แสดงวิธีการค้นหาโค้ดฟิลด์และผลลัพธ์ของฟิลด์:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-Programming with Documents-working_with_fields-GetFieldCode.py" >}}

โปรดทราบว่าหากคุณกำลังมองหาเพียงชื่อของช่องผสานในเอกสาร คุณสามารถใช้วิธี [get_field_names](https://reference.aspose.com/words/python-net/aspose.words.mailmerging/mailmerge/get_field_names/) ในตัวแทนได้

ตัวอย่างโค้ดต่อไปนี้แสดงวิธีรับชื่อของเขตข้อมูลผสานทั้งหมดในเอกสาร:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-Programming with Documents-working_with_fields-GetFieldNames.py" >}}
