#1
|
|||
|
|||
possible to always PASTE with same style?
HI,
i need to create a template that will be sent to customers that it's composed by different info "copy and pasted" there from other sources. I need to keep this info homogeneous, same Font and Size and eventually also hihglighted in Specific Colors. I managed to make it happened only when i type in it by using the "Content Control" using the Developer tab and the then "Design Mode". I cannot make it happen when i Paste in it info from elsewhere.. depending on the field you past in, the content must be a specific font, size and color.. ..and i don't want the agents to always bother which kind of Paste Option they use (Text Only, etc.. it should be an automatic CRTL+V if possible) I'm pretty a low level Word user.. |
#2
|
|||
|
|||
OK.. me again..
What if in this order: 1) i set the Content Control first with a specific Font, size and Color, then 2) i set as default to "Keep Text Only" in the "Cut, copy, and paste" option for all types of Pasting options. This will grant me that with a normal CTRL+V the text will be plain and adjunt to the Content Control i guess.. Now i guess i want to apply this "Default setting" ONLY to this document and not to ALL Words documents... |
#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 |
#4
|
|||
|
|||
Use a Rich Text or Plain Text Content Control and specify that the style for the content control must be a particular style in your document. (properties)
Be sure to take your document or template out of design mode when you are done. Restrict editing by not allowing changes with exceptions for everyone for your content controls. Note that while highlighting cannot be a part of a style definition, shading can be a part of that definition. Last edited by Charles Kenyon; 04-02-2015 at 07:50 AM. Reason: note about highlighting |
#5
|
|||
|
|||
macro and content control working from WORD to OUTLOOK
Thanks! it worked perfectly with the Macro! Many thanks..
now additional question: This Word document is working fine, but i may want to use the content ( that is a mail template) in OUTLOOK.. i don't want the guy copying and pasting ALL the times from Word to Outlook, so in theory i was thinking about having a Signature created. The problem is that IF i copy the Word doc content all the Properties will be lost, so NO MACRO is assigned and either the Content Control is working in a Signature in Outlook. ANy idea how to make it work? |
Tags |
content controls, paste, paste options |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use multiple style sets in the same Word document (depending on which section the style is in) | Ricyteach | Word VBA | 6 | 03-09-2015 07:11 PM |
How to globally change the formatting of a bullet style to another style? | 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 |