Thank you for providing this @JelteDeJong! I was trying to have AI write me something similar but wasn't getting the results I wanted. After using the code you provided, I was getting an error because of some sheets that we have as Excluded from Count. I ran your code through an AI chat and got the below to adjust that for me. If anyone else uses Exclude from Count on certain sheets, feel free to use this. (our prompted entry is SHEET TITLE, instead of SHEET DESCRIPTION, so that is changed in the below).

Exclude from Count error:
Length cannot be less than zero.
Parameter name: length
Dim doc As DrawingDocument = ThisDoc.Document
For Each sheet As Sheet In doc.Sheets
Dim titleBlock As TitleBlock = Sheet.TitleBlock
' Find the textbox within the title block's sketch that contains the prompt markers
Dim textBox As Inventor.TextBox = titleBlock.Definition.Sketch.TextBoxes _
.Cast(Of Inventor.TextBox)() _
.Where(Function(tb) tb.FormattedText.Contains("<Prompt") AndAlso tb.FormattedText.Contains("SHEET TITLE")) _
.FirstOrDefault()
If (textBox Is Nothing) Then
MsgBox("Prompted entry not found on sheet: " & Sheet.Name)
Continue For
End If
' Extract the sheet description; here, trimming after colon
Dim sheetDescription As String = Sheet.Name
Dim puntPlace As Integer = InStr(sheetDescription, ":")
If puntPlace > 0 Then
sheetDescription = sheetDescription.Substring(0, puntPlace - 1)
End If
' Set the prompt result text in the title block
titleBlock.SetPromptResultText(textBox, sheetDescription)
Next