Export and then Print RTF with tags embedded in document bod

I’m new to DTPO, and I’m wondering if it is possible to export RTF notes with their tags visible in the document body.

The reason I’d like to do this is to be able on occasion to print out (yes, print!) the notes with the tags visible so that I can sort them manually.

I’d be grateful for any help or guidance about this.

You could duplicate the documents, afterwards use this script to insert the tags and finally export the copies:


-- Insert tags in text. Requires split, column or 3-pane view.

tell application id "DNtp"
	set theWindow to think window 1
	set theSelection to the selection
	repeat with theRecord in theSelection
		if type of theRecord is rtf or type of theRecord is rtfd or type of theRecord is txt then
			set theTags to tags of theRecord
			set {od, text item delimiters of AppleScript} to {text item delimiters of AppleScript, ", "}
			set theTags to theTags as string
			set text item delimiters of AppleScript to od
			
			if theTags is not "" then
				set the selection of theWindow to {theRecord}
				tell text of theWindow
					make new paragraph with data ("Tags: " & theTags & return & return) at beginning
				end tell
				tell theWindow to save without asking
			end if
		end if
	end repeat
end tell

Thank you so much!