![]() The following code example demonstrates using the LockContents and LockContentControl properties of two different RichTextContentControl objects in a VSTO Add-in project. ![]() Me.Paragraphs(1).Range.InsertParagraphBefore()ĭim range1 As Word.Range = Me.Paragraphs(1).RangeĭeletableControl = Me.Controls.AddRichTextContentControl(range1, _ĭeletableControl.PlaceholderText = "You can delete this control, " & _ĭim range2 As Word.Range = Me.Paragraphs(2).RangeĮditableControl = Me.Controls.AddRichTextContentControl(range2, _ĮditableControl.PlaceholderText = "You can edit this control, " & _ĮditableControl.LockContentControl = True Private Sub AddProtectedContentControls() Word.Range range2 = ĮditableControl = (range2,ĮditableControl.PlaceholderText = "You can edit this control, " +ĮditableControl.LockContentControl = true ĭim deletableControl As .RichTextContentControlĭim editableControl As .RichTextContentControl Word.Range range1 = ĭeletableControl = (range1,ĭeletableControl.PlaceholderText = "You can delete this control, " + Private void AddProtectedContentControls() Private .RichTextContentControl editableControl Private .RichTextContentControl deletableControl To run this code, add the code to the ThisDocument class in your project, and call the AddProtectedContentControls method from the ThisDocument_Startup event handler. The following code example demonstrates using the LockContents and LockContentControl properties of two different RichTextContentControl objects in a document-level project. Set the LockContents property of the content control to true to prevent users from editing the control, and set the LockContentControl property to true to prevent users from deleting the control. To prevent users from deleting the control, set LockContentControl to True. To prevent users from editing the control, set LockContents to True. ![]() In the Properties window, set one or both of the following properties: In the document that is hosted in the Visual Studio designer, select the content control that you want to protect. To protect a content control at design time For more information, see How to: Add content controls to Word documents. You can also protect content controls that you add to a document at run time by using a VSTO Add-in project. ![]() You can prevent users from editing or deleting a content control by setting properties of the control in a document-level project at design time or at run time. For more information, see Features available by Office application and project type. You can protect a part of a document that is not in a content control.Īpplies to: The information in this topic applies to document-level projects and VSTO Add-in projects for Word. There are several ways you can protect parts of a Microsoft Office Word document by using content controls: See the VoiceOver User Guide.When you protect part of a document, you prevent users from changing or deleting the content in that part of the document. You can also use VoiceOver, the built-in screen reader for macOS, to hear descriptions of every item on the screen and to control your Mac using the keyboard. When you’re done choosing options, click OK. You can use the controller to pause, resume, or stop the speaking, change the speaking rate, and skip ahead or backward in the text. The controller is especially useful when your Mac is reading long pieces of text. Show Controller: Click the pop-up menu to choose to automatically show the controller when you press the keyboard shortcut, or to never or always show it. Sentence Style: Click the pop-up menu to have spoken sentences indicated by an underline or with a background color. If you don’t want spoken content highlighted, choose None from the Highlight Content pop-up menu. Click the Word Color and Sentence Color pop-up menus to choose the highlight color. Highlight Content: Click the pop-up menu, then choose to have words, sentences, or both highlighted as your Mac speaks. For example, press the Option and Tab keys together to set the keyboard shortcut as Option+Tab. Keyboard Shortcut: Press the key combination you want to use. To set a different keyboard shortcut and change other settings, click the Info button next to “Speak selection”: (You may need to scroll down.)īy default, your Mac speaks text when you press the keyboard shortcut Option-Esc. On your Mac, choose Apple menu > System Settings, then click Accessibility in the sidebar.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |