View Single Post
 
Old 10-13-2022, 05:29 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If the file protection type is 'Filling in forms' then the first content control in the document will be automatically selected when you open the document.

If the file protection is 'No changes (Read only)' then there seems to be no point in selecting anything. Reading doesn't need a selection.

If you do still want to select something specific as the file is opened then you are relying on the whim's of the system/user in enabling macros. If you wanted to go down this path you can put a macro like this into your ThisDocument module
Code:
Private Sub Document_Open()
  Dim aCC As ContentControl
  On Error Resume Next
  Set aCC = ActiveDocument.SelectContentControlsByTitle("MyDate")(1)
  aCC.Range.Select
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote