#16
|
|||
|
|||
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. |
#17
|
|||
|
|||
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. |
#18
|
||||
|
||||
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 |
#19
|
|||
|
|||
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. |
#20
|
|||
|
|||
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 |
|
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 |
Deleting a table from a content control -- preserving the content control | BrainSlugs83 | Word Tables | 8 | 11-14-2013 03:06 AM |
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 |