![]() |
#3
|
||||
|
||||
![]()
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 |
Tags |
content controls, paste, paste options |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Ricyteach | Word VBA | 6 | 03-09-2015 07:11 PM |
![]() |
ravl13 | Word | 5 | 03-10-2013 05:04 PM |
Config style to restart numbering if it it comes after a style of a higher level | ghumdinger | Word | 7 | 08-31-2011 01:10 AM |
How to create macro to paste text after style? | Srivas | Word | 0 | 03-16-2010 05:28 AM |
Character style stripped while applying paragraph style | sams_gates | Word | 0 | 08-29-2009 02:03 AM |