Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-02-2015, 01:13 AM
Nabarez Nabarez is offline possible to always PASTE with same style? Windows 7 32bit possible to always PASTE with same style? Office 2010 32bit
Novice
possible to always PASTE with same style?
 
Join Date: Apr 2015
Posts: 3
Nabarez is on a distinguished road
Red face 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..
Reply With Quote
  #2  
Old 04-02-2015, 01:29 AM
Nabarez Nabarez is offline possible to always PASTE with same style? Windows 7 32bit possible to always PASTE with same style? Office 2010 32bit
Novice
possible to always PASTE with same style?
 
Join Date: Apr 2015
Posts: 3
Nabarez is on a distinguished road
Default

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...
Reply With Quote
  #3  
Old 04-02-2015, 02:57 AM
gmayor's Avatar
gmayor gmayor is offline possible to always PASTE with same style? Windows 7 64bit possible to always PASTE with same style? Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,105
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 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
  #4  
Old 04-02-2015, 07:46 AM
Charles Kenyon Charles Kenyon is offline possible to always PASTE with same style? Windows 8 possible to always PASTE with same style? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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

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.
Attached Images
File Type: png 00 deleteme 0.png (29.8 KB, 18 views)

Last edited by Charles Kenyon; 04-02-2015 at 07:50 AM. Reason: note about highlighting
Reply With Quote
  #5  
Old 04-07-2015, 03:44 AM
Nabarez Nabarez is offline possible to always PASTE with same style? Windows 7 32bit possible to always PASTE with same style? Office 2010 32bit
Novice
possible to always PASTE with same style?
 
Join Date: Apr 2015
Posts: 3
Nabarez is on a distinguished road
Default 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?
Reply With Quote
Reply

Tags
content controls, paste, paste options



Similar Threads
Thread Thread Starter Forum Replies Last Post
possible to always PASTE with same style? 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
possible to always PASTE with same style? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 05:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft