gmaxey
03-11-2019, 11:50 AM
What has Microsoft done to break Word? For years, I have used a simple line of code to set the start location when creating a new document.
The
Sub AutoNew()
ActiveDocument.SelectContentControlsByTitle("Target").Item(1).Range.Select
MsgBox Selection.Range.Text 'Words as the message box returns the text, in the target content control
' But when the code completes and the document is displayed, the cursor is at the top of the page and not the range just selected!!
End Sub
The
Sub AutoNew()
ActiveDocument.SelectContentControlsByTitle("Target").Item(1).Range.Select
MsgBox Selection.Range.Text 'Words as the message box returns the text, in the target content control
' But when the code completes and the document is displayed, the cursor is at the top of the page and not the range just selected!!
End Sub