Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #46  
Old 04-07-2016, 01:48 PM
jmglastetter jmglastetter is offline Multiple entries in dropdown lists Windows 10 Multiple entries in dropdown lists Office 2016
Novice
 
Join Date: Mar 2016
Posts: 4
jmglastetter is on a distinguished road
Default All Caps breaks the flow to the 2nd field

Hi, When trying this I could never get it to work in my document, although it worked fine in yours. I believe I have narrowed the problem down to this:

Within my document, an invoice, I want everything to be capitalized regardless of whether the user has Caps Lock on, so within font properties, I had All Caps selected.



I found that turning off All Caps fixed the issue. I also found that on your example document, by selecting all and enabling All Caps, this also broke the information from appearing.

Any thoughts as to why having All Caps on would break the information from appearing in the 2nd field?
Reply With Quote
  #47  
Old 04-07-2016, 02:49 PM
macropod's Avatar
macropod macropod is offline Multiple entries in dropdown lists Windows 7 64bit Multiple entries in dropdown lists Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

This has nothing to do with whether the Caps Lock key is on or whether you're using All Caps but with whether you're calling the output content control with the correct name in the code -
CLIENTDETAILS
is not the same as:
ClientDetails
In the code, the names are case-sensitive.

As for capitalising whatever the ClientDetails control displays, that can be accomplished by changing:
.Range.Text = StrDetails
to:
.Range.Text = UCase(StrDetails)
though you should, perhaps, be capitalising whatever you're inputting into the 'Client' content control to begin with.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #48  
Old 04-07-2016, 03:57 PM
jmglastetter jmglastetter is offline Multiple entries in dropdown lists Windows 10 Multiple entries in dropdown lists Office 2016
Novice
 
Join Date: Mar 2016
Posts: 4
jmglastetter is on a distinguished road
Default

Hi, your thoughts led me to some more experimenting.

Using your idea to capitalize whatever I'm inputting into the 'Client' content control to begin with, I have further narrowed it down to this: If All Caps is active, and the Display Names for your drop down are already all capitalized, it will work. If any letters of individual Display Names are not capitalized, those specific selections will not work, but selections that have all capitalized display names will.

It appears that the capitalization of Values does not break this, even if All Caps is on, and you input value's have lower case letters, it will still work.
Reply With Quote
  #49  
Old 04-07-2016, 04:59 PM
macropod's Avatar
macropod macropod is offline Multiple entries in dropdown lists Windows 7 64bit Multiple entries in dropdown lists Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If you're using All Caps, that would impact the comparison being done via:
If .DropdownListEntries(i).Text = .Range.Text Then
You can overcome that with:
If UCase(.DropdownListEntries(i).Text) = UCase(.Range.Text) Then
The above modification will work regardless of whether the particular content control's text is formatted as All Caps.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #50  
Old 04-07-2016, 06:33 PM
jmglastetter jmglastetter is offline Multiple entries in dropdown lists Windows 10 Multiple entries in dropdown lists Office 2016
Novice
 
Join Date: Mar 2016
Posts: 4
jmglastetter is on a distinguished road
Smile

Genius. Works perfectly now regardless of caps or no caps
Reply With Quote
  #51  
Old 04-08-2016, 08:21 AM
gmaxey gmaxey is offline Multiple entries in dropdown lists Windows 7 32bit Multiple entries in dropdown lists Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,427
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

The original subject of this thread is covered in a fair amount of detail with working examples here: http://gregmaxey.com/word_tip_pages/...down_list.html
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #52  
Old 08-22-2016, 02:09 AM
Messias21 Messias21 is offline Multiple entries in dropdown lists Windows 7 64bit Multiple entries in dropdown lists Office 2010 64bit
Novice
 
Join Date: Aug 2016
Location: Hamburg, Germany
Posts: 2
Messias21 is on a distinguished road
Default

Hey, I am trying to use this on a letter form. Is it possible to use to input from the dropdown in 2 different contentcontrols? For Example the dropdown is in a control called "Client" and then I have 2 content controls where the values from the dropdown is applied. One is called "Clientname", in this one the client name which is used in the dropdown already should be displayed again. The second contentcontrol should be called "ClientCode". In this one a client specific code should be shown.

So the value in the contentcontrol dropdown options should be something like this:

Bank1 | Code: 1234abcd

How to I apply this in the code from the first example?
Reply With Quote
  #53  
Old 08-22-2016, 04:52 AM
macropod's Avatar
macropod macropod is offline Multiple entries in dropdown lists Windows 7 64bit Multiple entries in dropdown lists Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That kind of thing has already been discussed, see, for example posts #9 & #19. As per the discussions in those posts, you could, for example, use code like:
Code:
ActiveDocument.ContentControls(2).Range.Text
ActiveDocument.ContentControls(3).Range.Text
or:
Code:
With ActiveDocument.SelectContentControlsByTitle("ClientDetails")
  .Item(1).Range.Text = StrDetails
  .Item(2).Range.Text = StrDetails
End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #54  
Old 08-22-2016, 06:35 AM
Messias21 Messias21 is offline Multiple entries in dropdown lists Windows 7 64bit Multiple entries in dropdown lists Office 2010 64bit
Novice
 
Join Date: Aug 2016
Location: Hamburg, Germany
Posts: 2
Messias21 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
That kind of thing has already been discussed, see, for example posts #9 & #19. As per the discussions in those posts, you could, for example, use code like:
Code:
ActiveDocument.ContentControls(2).Range.Text
ActiveDocument.ContentControls(3).Range.Text
or:
Code:
With ActiveDocument.SelectContentControlsByTitle("ClientDetails")
  .Item(1).Range.Text = StrDetails
  .Item(2).Range.Text = StrDetails
End With
Hey, thanks for the reply.

Is it possible to just use different parts of the string (f.e. Bank1 (Part 1) | abcd1234 (part 2) | Mr. Meyer (Part 3) ) in different contentcontrols?
Reply With Quote
  #55  
Old 08-22-2016, 02:55 PM
macropod's Avatar
macropod macropod is offline Multiple entries in dropdown lists Windows 7 64bit Multiple entries in dropdown lists Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That, too has been discussed.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #56  
Old 02-24-2017, 08:59 AM
ceeaye ceeaye is offline Multiple entries in dropdown lists Windows 10 Multiple entries in dropdown lists Office 2010 64bit
Novice
 
Join Date: Feb 2017
Posts: 1
ceeaye is on a distinguished road
Cool

Quote:
Originally Posted by macropod View Post
You could add the entries to a dropdown content control. As the dropdown only supports a single line per entry, the other data could be output to a plain text or rich text content control via an on_exit macro. See attached demo
Hi there,

Ive attempted to utilize your demo and am having an issue with a new drop down box being added to the doc...

i have a dropdown cc named "Type" with a few choices within. I copied and pasted the dropdown cc onto the second page.

What happens is, my macro runs, the value changes per the macro; however, the first dropdon cc is not changed, the second is changed and a third dropdown cc magically appears.

Perhaps you can assist me with solving my issues? Please let me know.

Many thanks
Reply With Quote
  #57  
Old 02-24-2017, 08:01 PM
macropod's Avatar
macropod macropod is offline Multiple entries in dropdown lists Windows 7 64bit Multiple entries in dropdown lists Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Without actually seeing the problem document, it's impossible to diagnose the issue. Can you attach the document to a post (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #58  
Old 05-15-2017, 01:10 PM
HVAS HVAS is offline Multiple entries in dropdown lists Windows 10 Multiple entries in dropdown lists Office 2016
Novice
 
Join Date: May 2017
Posts: 2
HVAS is on a distinguished road
Default

Hi Macropod,

I've read through the entire thread, and didn't see anything about the issue I'm having.

If I change the data in your original list boxes, this works fine. As soon as I put the list box and macro into my document, saving as a .docm, the macro does not run. I even tried building all of my text & form fields around yours, and it still wont' work.

Any suggestions would be greatly appreciated!

Thanks!
Reply With Quote
  #59  
Old 05-15-2017, 03:00 PM
HVAS HVAS is offline Multiple entries in dropdown lists Windows 10 Multiple entries in dropdown lists Office 2016
Novice
 
Join Date: May 2017
Posts: 2
HVAS is on a distinguished road
Default

Ha ... I surprised myself and figured out my problem. Here is the (my) solution, in case anyone else runs into the same issue.

I was not changing "ActiveDocument.ContentControls(11).Range.Text = StrDetails" to reflect the actual content item. I've changed it from 2 to 11, and it works perfectly now!

Thank you for all of your previous comments; they will help me immensely as I stumble through this project!

Dawn
Reply With Quote
  #60  
Old 07-03-2017, 12:34 PM
Whytewhysper Whytewhysper is offline Multiple entries in dropdown lists Windows 10 Multiple entries in dropdown lists Office 2016
Novice
 
Join Date: Jul 2017
Location: Aurora, CO
Posts: 2
Whytewhysper is on a distinguished road
Default

Paul,

I do not see any macro code to copy. Is there someplace special I should be looking for the code?

Tim M
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple entries in dropdown lists 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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:11 PM.


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