Selection.CreateAutoTextEntry method (Word)
Adds a new AutoTextEntry object to the AutoTextEntries collection, based on the current selection.
Syntax
expression. CreateAutoTextEntry
( _Name_
, _StyleName_
)
expression Required. A variable that represents a Selection object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Required | String | The text the user must type to call the new AutoText entry. |
StyleName | Required | String | The category in which the new AutoText entry will be listed on the AutoText menu. |
Example
This example creates a new AutoText entry named "handdel" under the category "Mailing Instructions," given "HAND DELIVERY" as the currently selected text.
Selection.CreateAutoTextEntry "handdel", _
"Mailing Instructions"
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk