Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-13-2014, 05:37 AM
gmaxey gmaxey is offline Adding auto text to end of content control field Windows 7 32bit Adding auto text to end of content control field Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default


Then add " County" as fixed text after the CC and use:

Code:
 
Private Sub Document_ContentControlOnExit(ByVal CC As ContentControl, Cancel As Boolean)
  Select Case CC.Title
    Case "County"
      If InStr(CC.Range.Text, " County") > 0 Then CC.Range.Text = Replace(CC.Range.Text, " County", "")
  End Select
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there VBA to paste text into content control? kintap Word VBA 2 07-02-2014 07:42 AM
Adding auto text to end of content control field Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM
Adding auto text to end of content control field MS WORD 2007 - Content Control versus Text Form Field question chamdan Word VBA 2 11-12-2013 09:51 PM
Adding auto text to end of content control field How do you set rich text in a content control Testor Word VBA 4 07-08-2012 07:55 AM
Templates: automatic text generation from Rich Text content control Chickenmunga Word 0 10-01-2008 11:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:39 AM.


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