This article is a mirror article of machine translation, please click here to jump to the original article.

View: 4352|Reply: 2

[Source] VSTO (VI) cancels or blocks the Word document from being saved

[Copy link]
Posted on 5/7/2023 9:22:48 AM | | | |
Requirements: When the document triggers the save event, determine whether the word content contains the specified keywords, if it does, it is allowed to be saved, and if it does not contain the specified keywords, it cannot be saved.

Judgment documentWhether it contains the text "small slag"If it is included, it can be saved successfully, and if it is not included, it cannot be saved successfully, the rendering is as follows:



The DocumentBeforeSave event (Unable to prevent saving an open SharePoint linked document!!), the code is as follows:


Use the document's content properties to get the first and last indexes of the document scope:

(End)




Previous:VSTO (V) Deletes content controls in Word
Next:[Turn]. NET 8 Newly Added High-Performance Types
 Landlord| Posted on 5/7/2023 9:26:39 AM |
VSTO (VI) cancels or blocks the Word document from being saved
https://www.itsvse.com/thread-10581-1-1.html

VSTO (V) Deletes content controls in Word
https://www.itsvse.com/thread-10579-1-1.html

VSTO (IV) Fill the picture into a Word document
https://www.itsvse.com/thread-10578-1-1.html

VSTO (III) Inserts DataTable data into a Word document
https://www.itsvse.com/thread-10575-1-1.html

VSTO (2) Get the Word Chinese character length selection plug-in
https://www.itsvse.com/thread-10574-1-1.html

VSTO (1) Brief introduction and development tools
https://www.itsvse.com/thread-10573-1-1.html
Posted on 5/7/2023 3:35:34 PM |
Learn a little...
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com