Is it possible to use NUMCHARS to display the number of characters in a block of text instead of the whole document? How?

Is it possible to use NUMCHARS to display the number of characters in a block of text instead of the whole document? How?

Getting the character count for a paragraph is trivial:
Sub NumChars1()
MsgBox Selection.Paragraphs(1).Range.Characters.Count
End Sub
Even outputting it to the document is trivial:
Sub NumChars2()
With Selection.Paragraphs(1)
  .Range.InsertAfter .Range.Characters.Count
End With
End Sub
The real issue comes when you want to update the document. If the destination paragraph is only ever empty or contains the character count of the previous paragraph, you could use:
Sub NumChars3()
With Selection.Paragraphs(1)
  .Next.Range.Text = .Range.Characters.Count & vbCr
End With
End Sub
Cheers
Paul Edstein
[MS MVP - Word]

Similar Messages

  • Regions display name number of characters

    I would like to increase the number of characters currently available in the Region Display Name, currently I am limited to 40. How do I change the number of characters avaialble to me?

    Hi,
    Do you talk about Apex region?
    If so , create hidden item Px_ITEM and set it value with your long region name.
    Then use item on region title like &Px_ITEM.Br, Jari

  • After upgrading to Firefox 8.0.1, now on at least one website I use, it limits the number of characters that I can type in a text box to 275, is there a way to fix this?

    After upgrading to Firefox 8.0.1, now on at least one website I use, it limits the number of characters that I can type in a text box to 275, is there a way to fix this?

    That may be part of the coding that the web page is using.
    *https://developer.mozilla.org/en/HTML/element/input

  • When I use 'edit in PS' from LR 4.4, it opens PS 32 bit instead of 64 bit. How do I change this?

    When I use 'edit in PS' from LR 4.4, it opens PS 32 bit instead of 64 bit. How do I change this?

    Change the relevant file associations in the prefs.
    Mylenium

  • How to limit the number of characters a label displays?

    Can someone please tell me how I can limit the number of characters a label displays from the text property?

    Ok. What I am trying to do is display a number with the format
    x.yy
    I need the display to show all characters all the time.  For example let me show you what I currently get and what I require.
    Current     Require
    0               0.00
    0.1            0.10
    etc
    To me its like the label is truncating the number appropriately and I dont want it to do that.  I need a fixed 4 character format.
    Hope this clears it up.

  • Both my boss and I have the iPhone 5C for Verizon.  When I text, I have the little microphone next to the space bar, allowing me to use the speech to text function.  He does not.  How do you turn this on or remedy this problem?

    Both my boss and I have the iPhone 5C for Verizon.  When I text, I have the little microphone next to the space bar, allowing me to use the speech to text function.  He does not.  How do you turn this on or remedy this problem?

    Does your boss have Siri turned ON? See Settings > General > Siri.

  • Possible to use process substitution a variable number of times?

    Hello Archers,
    I have a script like so:
    #! /bin/bash
    ( readlink /proc/$$/fd/0 | grep -q "^pipe:" ) || ( file $(readlink /proc/$$/fd/0) | grep -q "character special" )
    cat | tee >(awk 'NR % 2 == 0') >(awk '(NR+1) % 2 == 0')
    Well, it's pretty trivial at the moment, but the underlying goal is to split the input, so it can be processed in parallel on multiple cores. If I understand correctly, the above code will split the input across exactly two cores. Does there exist some way to put the process substitution (i.e. ">(awk ' ... ')")  in a loop?
    Before trying to increase the number of cores, I first tried to see whether I could loop just two times with,
    cat | tee $(for i in 1 2; do >(awk -vn="$i" '(NR + $n) % 2 == 0'); done)
    but that didn't work.
    It also occurred to me that maybe I'm presenting an X-Y problem. I did also consider using the split command, but as far as I can tell, it will only dump its output to files; it's no good for piping or process substitution. Any other ideas that would avoid needing to tee across a variable number of process substitutions?
    Naturally, I tried a little Googlemancy, but only came up with answers to newbie questions, or tutorials aimed at newbies.
    Thank you for your consideration.
    Last edited by /dev/zero (2012-03-26 07:16:25)

    Or if you want to avoid named pipes, since during development they tend to create lots of files, and the script has to clean them up afterwards, take a look at the 'coproc' feature bash has since version 4
    Though, remember that 'man bash' under BUGS says, there may only be one active coproc at a time.
    According to this it's not really such a big deal though.
    And it won't kill the started coprocesses or anything if you start another process...
    Here's a sample session: (the spaces are important btw. )
    wry:~/ $ bash [19:02:43]
    wry@blubmb:~$ coproc c1 ( cat )
    [1] 4129
    wry@blubmb:~$ coproc c2 ( cat )
    bash: warning: execute_coproc: coproc [4129:c1] still exists
    [2] 4130
    wry@blubmb:~$ echo $c1_PID $c2_PID -- ${c1[@]} ${c2[@]}
    4129 4130 -- 63 60 62 58
    wry@blubmb:~$ echo aaac1 >&${c1[1]}
    wry@blubmb:~$ echo bbbc2 >&${c2[1]}
    wry@blubmb:~$ read -u ${c1[0]} line1
    wry@blubmb:~$ read -u ${c2[0]} line2
    wry@blubmb:~$ echo $line1 and $line2
    aaac1 and bbbc2
    wry@blubmb:~$ kill $c1_PID $c2_PID
    wry@blubmb:~$
    [1]- Terminated coproc c1 ( cat )
    [2]+ Terminated coproc c2 ( cat )
    wry@blubmb:~$ exit
    exit
    Just keep in mind that the filedescriptors you get for a coproc won't be available in subshells you execute with &
    Eg. you cannot do
    coproc X
    ( use X ) &
    Links: http://wiki.bash-hackers.org/syntax/keywords/coproc

  • HT5463 Is it possible to use DND  on a single number and will this apply to messages as well?

    Can you use DND on a single phone number?

    What do you mean by "use DND"? Do you mean you want to block a single user? Or let only a single user through. The latter would be fairly simple. Just make that person the only "Favorite" and set DND to allow only favorites through.  Blocking only one person can be simply accomplished by assigning them customer ring and text tones of silence.

  • Is it possible to use "Delay Values" to create a frequency signal from digital "Count Edges" -task? (= are the results I'm getting correct?)

    Hello.
    I have a digital encoder from which I need freaquency information (to ultimately get rpm -infromation). The problem is that this task is inside a loop with 2 other DAQmx -tasks that are using "one sample on demand"-aquisition mode and if I configure this new counter task to be a freaquency task, it only updates once in ~ second which makes the whole loop lag.
    I thus created an "artificial" freaquency signal by using "Count Edges" -aquicition mode and the "Delay Values" -block so that I substract the delayed signal from original "Count Edges" -signal. There is a 0,01s delay in the loop and I figured out that if the history of the "Delay Values" -block is 100 samples I would thus get the real edge-freaquency.
    I tested this configuration and the results seem to be at least really close to correct but I have no idea if this idea is in any way correct...
    This explanation was probably quite confusing so please see the picture attached.
    Thanks a lot in advance! 
    Attachments:
    are_the_results_correct.jpg ‏200 KB

    First of all, thank you for quick reply. Unfortunately I don't have the acces to the vi. until tomorrow.
    And yes, I think you understood correctly: essentially this arragement measures how many edges have been counted during one iteration. This is how I figured out that this could then be used as a frequency measurement:
    1. From the "Edges - Delayed Edges" I get the information on how many edges have been counted during last iteration.
    2. I "know" (really I don't?) that one iteration lasts ~0,01s because of the delay in the loop.
    3. There is 2048 edges in one round of the encoder so I get the rpm as follows: rpm = (edges - delayed edges)/204,8*60(s)
    (If I was using history size of one as you suggested it would be: rpm = (edges-delayed edges)/2048 * 60) However using history size of 10 and taking it account in the multiplication smoothens the response nicely.
    But doesn't this arragement count on the fact that the vi runs smoothly and there is no additional lag?
    I quess using another loop and notifiers for a dedicated freaquency measurement as you suggested could be worth trying. I just have to first learn how to use them. 
    If I do use them will the main loop run smoothly and not wait for every update of the notifier? This would be essential since the freaquency output refresses only about once in a second if I use the continious aquisition mode.
    Attachments:
    are_the_results_correct.jpg ‏198 KB

  • TS3988 ough my ipad used it says te maximum number of accounts has been reached .i do not no the preavous owners acconts help

    i bought my ipad udes it says the maximum number of free accountd has been reached i dont no the preavious owners account help

    All you can do is create an account to use on another iOS device of Mac running OS X 10.7.2 or higher, if you have one.  If you don't, perhaps a friend with one would do this for you.  Or, as a long shot, you could try going to the genius bar at a nearby Apple store to see if they would allow you to do this on one of their devices.

  • Is it possible to use fingerprint for App Store purchases but still be able to just swipe to unlock the phone?

    I seem to make it where I can unlock my iPhone 6 with a mere swipe (without a passcode or fingerprint scan) and still be able to use fingerprint for app purchases. Is this possible?

    Hi,
    I'm not sure if we can directly convert the Android project to Windows Phone/Store app project, but we can share the code between deferent platforms, as the documentation says here:
    https://msdn.microsoft.com/en-us/library/dn771552.aspx?f=255&MSPPError=-2147217396#ShareHTML
    If the code is specific to Android platform, it's not possible to convert it to windows platform I think.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • HT204492 When I use remote, it talks to me in a quick voice with number of button choices, then tells me the number, ect.  Very annoying.  She talks so fast as well.  How can I shut that off or make her talk slowly, or not at all.

    When I use mt Appew TV remote it talks to me, in fast voice, telling me where I am, number of choices, etc.  It is annoying and I can't find a way to just have screen on tv and then access whatever without this fast talking voice.

    Turn off Voice Over in the Accessibility section of AppleTV Settings.

  • Can I use a thunderbolt display with an hdmi converter to a PC?

    I bought a Thunderbolt display, and have seen a ThunderBolt/MiniDisplay Port to hdmi converter.
    Is it possible to use a ThunderBolt display as PC display if I use this converter?
    thanks!

    Probably not.  Unlikely.  The ThunderBolt/MiniDisplay Port-to-hdmi converters are intended for connecting the thunderbolt port on an Mac to an HDMI input on a display or TV.  You can't assume these converters work backwards and without knowing exactly what converter you are talking about, and what video out your pc has ... it's impossible to say.
    I would add that one should think long & hard about risking a $1000 Apple thunderbolt display by connecting it to something it wasn't designed for.

  • Re: [iPlanet-JATO] using begin childName Display method

    Oops. Sorry about that, Craig. I didn't realize I might leave that impression.
    I'm sure the tiled
    views work since you have so many examples of these and it's a relatively
    simple concept, isn't it?
    Not to mention a necessary one. I didn't have time to debug my code and find
    out what I was doing
    wrong where the tiled views are concerned. I decide to just try to implement
    tiled views later and
    just stick with one of everything for now and get that working.
    Yes, I have reviewed your comments and am taking them into consideration. I am
    able to save and
    retrieve values with my model at this point.
    Thanks.
    Belinda
    X-eGroups-Return:
    sentto-2343287-1143-1008622698-belinda.garcia=sun.com@r...
    X-Sender: craig.conover@s...
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4)Gecko/20011019 Netscape6/6.2
    X-Accept-Language: en-us
    From: "Craig V. Conover" <craig.conover@s...>
    X-Yahoo-Profile: cvconover
    Mailing-List: list [email protected]; contact
    [email protected]
    Date: Mon, 17 Dec 2001 13:00:10 -0800
    Subject: Re: [iPlanet-JATO] using begin<childName>Display method
    Content-Transfer-Encoding: 7bit
    Belinda,
    He may also be binding the models, howerver, he needs to change the way
    the value appears before it is displayed which is why you would use the
    display events.
    Your null value issue is a completely different issue and has nothing to
    do with it being a tiled view. I don't want anyone getting the idea
    that the tiledView binding is broken. It does work. You issue should
    have something to do with the inconsistent way in which you are getting
    your model. At least from what I could tell in your source code that you
    sent me.
    Have you reviewed my comments I sent to you in your source code?
    craig
    Belinda Garcia wrote:
    I don't currently use a begin or end Display method. I merely bind the
    fields to
    the model when the child is created and use the setValue to initially setthe
    value to what's in the model. I get nulls though if I try to use a tiledView. I
    haven't quite got this figured out.
    Belinda
    X-eGroups-Return:
    sentto-2343287-1135-1008613974-belinda.garcia=sun.com@r...
    X-Sender: stephen_winer@y...
    User-Agent: eGroups-EW/0.82
    From: "stephen_winer" <stephen_winer@y...>
    X-Originating-IP: 155.188.191.4
    X-Yahoo-Profile: stephen_winer
    Mailing-List: list [email protected]; contact
    [email protected]
    Date: Mon, 17 Dec 2001 18:32:48 -0000
    Subject: [iPlanet-JATO] using begin<childName>Display method
    Content-Transfer-Encoding: 7bit
    I want to be able to conditionally show/hide data as well as format
    it for display without touching the model. I found the
    begin<childName>Display and end<childName>Display methods that
    provide the hooks to do this, but I have been unsuccessful in getting
    these method to execute. I added the fireChildDisplayEvents="true"
    attribute to the jato:useViewBean tag, but this has not helped. I
    also added some debug to the ContainerViewBase class in the public
    boolean beginChildDisplay(ChildDisplayEvent event) method to see what
    was happening. The displayMethodMap was returning null for the child
    display methods that were in the view bean. I covered all the bases
    (compiling, redeploying, etc.) and nothing has worked. Is there
    anything I am missing or is there some working example of this?
    Steve
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    The hidden field was present in the page, but it looked like this:
    <input type="hidden" name="jato.defaultCommand" value=""../search"">
    Seems like there is a small bug in the code generating this tag.
    FYI - I am using JATO1.2
    What file displays this text? Maybe I can go in and fix it and rejar
    it.
    Steve
    --- Mike Frisino wrote:
    Steve,
    Can you check the HTML source that shows up in the browser? Do you see an entry that looks like this at the bottom of the form in
    question?
    >
    <input type="hidden" name="jato.defaultCommand" value="/search">
    To answer your question - it should work as you described. Some of the JatoSample make use of the defaultCommandChild. Can you try
    running the sample BasicSample->Field Types and let us know what you
    see.
    >
    Failing this you can send me your jsp file , maybe there is some subtle issue there. michael.frisino@s...
    >
    >
    ----- Original Message -----
    From: stephen_winer
    Sent: Friday, December 07, 2001 8:05 AM
    Subject: [iPlanet-JATO] Using the defaultCommandChild in a form
    I am trying to set the defaultCommandChild in my jato:form tag to be
    the searcg button. The search button definition is:
    <jato:button name="search"/>.
    The form tag definition is:
    <jato:form name="PendingIA" defaultCommandChild="/search">
    Clicking on the search button works fine, but hitting return in one
    of the textFields (which submits the form) passes a value of "" to
    the createChild method in my viewBean, which throws an error. Why
    does this not just work as normal and trigger the handleSearchRequest
    () method?
    Steve
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Service.
    >
    >
    >
    [Non-text portions of this message have been removed]

  • Method to use to display (n) number of strings

    hi,
    I have a list of strings stored in an array, I need to be able to show these on screen after pressing a button. I am not sure what to use to display these, I setup an action listener on the button to create new JLabel for every string in the array which are created using a while loop, as the number cant be predefined. however by adding a new label to the panel it will only update after having left the screen and come back to it, is there another method I could use as this is obviously no good, maybe I should not use labels to display the strings. However I cannot create a preset number of labels, as the number required is unkown.
    any ideas?

    If you want the really cheap way to do it, you can use a label with multiple lines by putting <html>...</html> tags around the text and <br> between the lines. :-)
    The way we do it here though is to use a JTextArea which is formatted to look like a label.
    JLists are another way to do it, but JTextArea can wrap the lines, which JList cannot.

Maybe you are looking for

  • How come someone elses Apple ID Shows up when I try to update my apps

    How come someone elses Apple ID Shows up when I try to update my apps? It's Grey and won't let me change it. I've signed out and resigned in, but this very odd email address always shows up as my apple ID. Please help if you can, I just need to updat

  • SCCM 2012 Multiple Domains with a single SCCM instance

    Hello: Can SCCM 2012 be deployed to multiple untrusted domains within a single install? I work for a company that maintains multiple client networks all Windows Domain and non are trusted / or are even aware of the other sites. I would like to setup

  • Cannot charge iPhone 5 because USB is "using too much power"

    Last night I tried charging my iPhone 5 on my MacBook Pro and everything went fine. However, when I tried to do the same thing today, every time I would plug my device in I would get an error message saying that the USB device is using too much power

  • Program to maintain the selevtion variables

    Hi All, I maintain the variables in TVARV table where i need to maintain the condition low high for the variable which programme will maintain it. regards sai

  • Sony Mini-DVD Camcorder

    I recently bought a mac book pro and I have final cut express. I am trying to hook up my sony mini dvd camcorder to my computer so that I can capture my footage off of my camcorder to make movies. Any suggestion would be helpful. Thanks