#121
|
|||
|
|||
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.
|
#122
|
||||
|
||||
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] |
#123
|
|||
|
|||
Quote:
|
#124
|
|||
|
|||
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?
|
#125
|
||||
|
||||
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 |
#126
|
|||
|
|||
Quote:
|
#127
|
||||
|
||||
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 |
#128
|
|||
|
|||
Does this work in the Header of Word?
Hello, I successful got this to work in my document. Thank you! However, I would like to have this work in the Header of Word. I keep getting an error message on this line of the VBA code. Is it possible?
ActiveDocument.ContentControls(2).Range.Text = StrDetails |
#129
|
||||
|
||||
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 |
#130
|
|||
|
|||
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 |
#131
|
||||
|
||||
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] |
#132
|
|||
|
|||
Thanks Paul. I'll start a new thread.
|
#133
|
|||
|
|||
Hi,
Thank you for this code. In the Content Control Properties > Drop-Down List Properties, is it possible to input more text? The Value field cuts off my text after a certain character limit. |
#134
|
||||
|
||||
Yes, there's a limit to how much content you can store in a content control's value. For longer content, you can use custom document variables instead. For some code that does that, see: https://www.msofficeforums.com/word-...tml#post119230. The code in that post also gets the variable content from Excel, but that may or may not be relevant to your requirements. The important thing to not is how the document variables are used.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#135
|
|||
|
|||
Three dependent form fields
Hello,
I'm trying to create an invoice template. Is there a possibility to have 3 text fields filled out depending on whats chosen in a dropdown list? The problem is that the text for each field needs to be a different one. Everything is supposed to be in one line in a table that can be replicated using ContentControl. E.g.: Product Name (from dropdown list) -> Product number -> Additional info -> Price Thanks in advance Enci |
|
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 |