|
#1
|
||||
|
||||
As post #2 says, the process is managed via an on_exit macro. Did you copy that from the demo file into your own document?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
I believe I did, when I check it in VBA I am seeing "Document" and "ContentControlOnExit" in the drop down next to it.
|
#3
|
||||
|
||||
And is that macro in the 'ThisDocument' code module of you document or its template - as shown in the attachment to post #2?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
Yes, I copied the macro over from the original document you uploaded after updating the content controls. I've attached my document, and would greatly appreciate any insight you might have.
Last edited by jsalas; 02-08-2019 at 02:20 PM. |
#5
|
||||
|
||||
The code in your document works as is for me. All one need do is select an entry an exit the dropdown. If that's not working for you, check your macro security settings.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
||||
|
||||
Changing the dropdown entries and outputs is as simple as editing the content control properties, which you can access via the Developer tab. See: https://support.office.com/en-us/art...4-0685ae00e9b4
You can have the content controls wherever you want them. Do be aware, though, that when they're placed in a header or footer, exiting them in a way that closes the header or footer won't trigger the on-exit macro.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Thanks, I have the developer tab opened but for some reason, I can't edit the contents to change their names. Any idea why this would be happening? To be honest I'm kind of a noob with Word and may not be looking in the right spot.
|
#8
|
||||
|
||||
If you click on the dropdown content control, you should then be able to click on 'Properties' to edit the items.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
I am also not sure if this was already answered as this thread is from years ago and I am not that familiar with how this works, but I am trying to create a drop down where the values listed are different than the output values. So I would have “Number 1” as the displayed value and “New York” as the output answer, etc. I tried using several of the previous codes but I need “Number 1” to go away and all I will be left with is “New York” in the document, does this make sense?
|
#10
|
||||
|
||||
It can be done if you:
1. Set up the drop down CC with different values for Display Name and Value 2. Bind that CC to an XML Mapping element by using the XML Mapping Pane 3. Make a selection with the drop down When you want to 'fix' the CCs to show the values, run the 4. Run a macro to convert the CC type to a Plain Text CC. Code:
Sub ChangeCCType() Dim aCC As ContentControl For Each aCC In Selection.Range.ContentControls aCC.Type = wdContentControlText Next End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#11
|
|||
|
|||
Quote:
|
#12
|
||||
|
||||
The attached doc shows how it can work.
The simplest way to get a linked CC is to insert a CC via Insert>Quick Parts>Document Property> and choose one. This will give you a plain text CC linked to that document property. You can step up a level by going to Developer>XML Mapping Pane>{select a schema like core-properties}>right click on an element eg title and choose Insert Content Control>Combo Box. If you want to really get serious, you should use the tools provided by Greg Maxey or Graham Mayor
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#13
|
||||
|
||||
jmadsen
This thread now has 128 posts in it and has headed in many different directions. You will need to provide more information if you want help. Perhaps attach your doc and describe more fully what you want to happen.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#14
|
|||
|
|||
back to the beginning
I applied the solution that Paul worked out in post #2 and it works great for smaller texts with more than one line.
Is it also possible to have two or more paragraphs of multiple lines as an output in the ClientDetails content control? And if so, could anyone explain me how to achieve this? I'm using this list box in an instruction report and sometimes there is more than one paragraph of fixed text in relation with the choice in the list box. Thanks for any advice/solution. Chris |
#15
|
||||
|
||||
Yes, it's possible simply by changing the Chr(11) reference to vbCr, but the amount of text that can be held in the values is quite small, plus no formatting is provided for. You might do better linking the choices to building blocks holding the desired content. Please start a new thread for that.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Delete Multiple Entries | dudeabides | Office | 1 | 07-04-2011 02:49 AM |
Multiple task lists and multiple calendars | kballing | Outlook | 0 | 01-18-2011 10:23 AM |
Creating Multiple Contact Lists | meltee78 | Outlook | 1 | 01-03-2011 09:45 PM |
multiple calendar entries across a group | halfhearted | Outlook | 0 | 10-11-2009 12:13 PM |
Word Forms : Dropdown lists | wferaera45 | Word | 0 | 04-06-2006 03:02 AM |