Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 06-16-2016, 02:59 AM
PSSMargaret PSSMargaret is offline Capitalize the first letter in a content control Windows 10 Capitalize the first letter in a content control Office 2010 64bit
Novice
Capitalize the first letter in a content control
 
Join Date: May 2016
Posts: 28
PSSMargaret is on a distinguished road
Default


Thank you for your reply Guessed. Unfortunately, your code did not work. The form has three rich text content controls on a line. The only way to obtain a carriage return in the last field is to enter Shift+Enter. Therefore, I believe the code needs to include soft returns as your calling them.
Reply With Quote
  #17  
Old 06-16-2016, 03:03 AM
PSSMargaret PSSMargaret is offline Capitalize the first letter in a content control Windows 10 Capitalize the first letter in a content control Office 2010 64bit
Novice
Capitalize the first letter in a content control
 
Join Date: May 2016
Posts: 28
PSSMargaret is on a distinguished road
Default

Thank you for your reply Guessed. Unfortunately, your code did not work. The form has three rich text content controls on a line. The only way to obtain a carriage return in the last field is to enter Shift+Enter. Won't the code need to include soft returns as your calling them.

HOW DO YOU DELETE A THREAD. I DIDN'T THINK THE FIRST REPLY POSTED SO I DID ANOTHER ONE BUT CAN'T SEEM TO FIND A WAY TO DELETE THE SECOND ONE.
Reply With Quote
  #18  
Old 06-16-2016, 04:14 AM
gmayor's Avatar
gmayor gmayor is offline Capitalize the first letter in a content control Windows 10 Capitalize the first letter in a content control Office 2016
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

I know I am going to regret asking this, but if you want paragraphs in the content controls, why put them on the same line?

If they are on separate lines, you don't need to use Shift+Enter for a new paragraph, nor indeed require the macro as capitalisation can e set by checking the autocorrect option to capitalize the first letter of sentences.

If you must have three on the same line, put them in a single row borderless table with fixed column widths, and then you can use the enter key (and apply styles to the content controls that would provide spacing between paragraphs as required).
__________________
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
  #19  
Old 06-16-2016, 04:32 AM
PSSMargaret PSSMargaret is offline Capitalize the first letter in a content control Windows 10 Capitalize the first letter in a content control Office 2010 64bit
Novice
Capitalize the first letter in a content control
 
Join Date: May 2016
Posts: 28
PSSMargaret is on a distinguished road
Default

Graham,

Don't appreciate the "I'm going to regret this" comment. Because that's the requirements of the form. The text in FormField2 must wrap at the end of the line and go beneath FormField1 (see below). That little requirement has made this project more complicated than I'd like but it's still the requirements of the form. As such, you cannot use tables either. Already tried that too.

FormField1: FormField2 (The text in this field must go to the end of the line, wrap below FormField1.
Reply With Quote
  #20  
Old 06-16-2016, 05:48 AM
gmaxey gmaxey is offline Capitalize the first letter in a content control Windows 7 32bit Capitalize the first letter in a content control Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Seems to me that this would still work in that case:

Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
With CCtrl
  Select Case .Type
    Case wdContentControlText, wdContentControlRichText, wdContentControlComboBox
      If Not CCtrl.ShowingPlaceholderText Then
        .Range.Case = wdTitleSentence
      End If
    Case Else
  End Select
End With
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
Macro to capitalize first letter after timecode + tab muiy Word VBA 1 06-17-2015 11:03 PM
Capitalize the first letter in a content control Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM
Capitalize the first letter in a content control Only Capitalize First Letter & Delete Last Name zulhfreelancer Excel 5 12-10-2012 07:51 AM
Exceptions for 'Capitalize first letter of sentences' gazpacho Word 1 01-12-2012 11:43 AM
capitalize first letter of sentences norco1 Word 0 06-25-2006 12:37 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:13 AM.


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