Thread: [Solved] Using a Paid stamp in Word
View Single Post
 
Old 09-27-2017, 07:31 AM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,529
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I've created an Add-In for this. Here is a link.
This will go in your Word Startup Folder.
00 deleteme 1.png

The macro it contains is as follows:

Code:
  Sub PaidStamp()
'
' PaidStamp Macro
' Charles Kenyon 27 September 2017
' As Is
'
    Dim nShape As Long
'
   Dim sBBName As String
'
   sBBName = "_PaidStamp"
   On Error GoTo Oops
   Application.Templates(ThisDocument.FullName).BuildingBlockEntries(sBBName).Insert Where:=Selection.Range, _
      RichText:=True ' Insert sBBName Building Block

    nShape = ActiveDocument.Shapes.Count 'Should select textbox for date
    ActiveDocument.Shapes(nShape).Select
'        Selection.Font.Size = 20
    Selection.TypeText Format(Now, "d mmmm YYYY - h:mm AM/PM")
    Selection.HomeKey Unit:=wdStory
    Exit Sub ' we're done
    
Oops: ' Didn't work - building block not there!
   MsgBox Prompt:="The Building Block " & sBBName & " cannot be found in " & _
      ThisDocument.Name & ".", Title:="Didn't Work!"
   On Error GoTo 0
End Sub
It needs to be used in the unprotected portion of a document if protected.
This is rough but should do what you want. It uses an AutoText that contains a WordArt PAID and a blank textbox for the date. You can change these so long as you use the same name for the AutoText entry. You can change the date format in the macro.

This uses a dollar sign icon 00 deleteme 2.png on the QAT to launch the macro.

The macro, the AutoText and the QAT button are all stored in the template.

Last edited by Charles Kenyon; 09-27-2017 at 10:00 AM.
Reply With Quote