A family of Microsoft word processing software products for creating web, email, and print documents.
I built my stamp based on your advice and the one from this thread https://answers.microsoft.com/en-us/msoffice/forum/all/run-time-error-5941-not-always-but-annoyingly/b95ec1db-6928-4d87-b799-52d4f1c01f08?page=1. It works!
Below is the code I use:
Sub Macro1()
'
' Macro1 Macro
'
'
Application.Templates.LoadBuildingBlocks
Application.Templates( \_
"C:\Users\username\AppData\Roaming\Microsoft\Document Building Blocks\1033\16\Building Blocks.dotx" \_
).BuildingBlockEntries("Stamp").Insert Where:=Selection.Range, RichText:= \_
True
ActiveDocument.Shapes.Range(Array("Text Box 2")).Select
ActiveDocument.Shapes.Range(Array("Text Box 2")).Select
Selection.Fields.Update
ActiveDocument.Shapes.Range(Array("Text Box 2")).Select
Selection.Fields.Unlink
ActiveDocument.Shapes.Range(Array("Text Box 2")).Select
Selection.Fields.Update
ActiveDocument.Shapes.Range(Array("Text Box 2")).Select
Selection.Fields.Unlink
End Sub
This community is wonderful. Thank you.