View Single Post
 
Old 04-02-2015, 02:57 AM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If you save the following macro in the document template (which will thus have to be saved as macro enabled). It will intercept the Paste command in documents created from the template (provided the person opening the document so created still has access to the template). The result will be to match the pasted text to the font at the position the text is inserted. In the case of a rich text content control, the font will be that of the style associated with the control.

See http://www.gmayor.com/installing_macro.htm

Code:
Option Explicit
Sub EditPaste()
    PasteUnfText
lbl_Exit:
    Exit Sub
End Sub

Private Sub PasteUnfText()
    On Error GoTo err_Handler
    Selection.PasteSpecial DataType:=wdPasteText, _
                           Placement:=wdInLine
lbl_Exit:
    Exit Sub
err_Handler:
    Beep
    GoTo lbl_Exit
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote