If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Go to a word at a particular number?
I will wait until you respond to Suzanne's last question. I likewise cannot
imagine that splitting a document on every nth word is really the most appropriate thing to do. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Bert Coules" wrote in message ... Doug Robbins wrote: Such a macro is not that complex. The following will ask you for the number of the word that you want to go to and then take you to it: Doug, thanks very much for that. In my ignorance, I'm amazed at how small and seemingly simple the code is. I hope you won't think me ungrateful if I say that it appears to count punctuation marks and carriage returns as words, which slightly diminishes its usefulness for my particular job. Is there a reasonably simple way of getting round that? Bert www.bertcoules.co.uk |
#12
|
|||
|
|||
Go to a word at a particular number?
Suzanne S. Barnhill wrote:
Surely you're not going to chop a MS arbitrarily after the 4,000th word? No, of course I'm not. But I have to divide it into sections of approximately that number, and how else am I going to find the starting-points from which to look for a nearby neat division if I can't first find out where the 4000-word point comes? Bert www.bertcoules.co.uk |
#13
|
|||
|
|||
Go to a word at a particular number?
Doug Robbins wrote:
I hope I've explained the circumstances in my answer to Suzanne Barnhill: the exact 4000-word markers are starting points from which to find the nearest neat and convenient places to divide the text. The exact size of the subsequent sections has to be approximately 4000 words but doesn't have to be exactly that number. Unless I can first identify where the 4000-word points occur, I can't really begin; and unfortunately including punctuation and returns in the count would throw things off rather too much. Does that make things clearer? I appreciate your help. Bert www.bertcoules.co.uk |
#14
|
|||
|
|||
Go to a word at a particular number?
Given that situation, I guess all you can do is add some allowance for
punctuation on top of the 4000. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Bert Coules" wrote in message ... Doug Robbins wrote: I hope I've explained the circumstances in my answer to Suzanne Barnhill: the exact 4000-word markers are starting points from which to find the nearest neat and convenient places to divide the text. The exact size of the subsequent sections has to be approximately 4000 words but doesn't have to be exactly that number. Unless I can first identify where the 4000-word points occur, I can't really begin; and unfortunately including punctuation and returns in the count would throw things off rather too much. Does that make things clearer? I appreciate your help. Bert www.bertcoules.co.uk |
#15
|
|||
|
|||
Go to a word at a particular number?
Doug Robbins wrote:
Given that situation, I guess all you can do is add some allowance for punctuation on top of the 4000. I'll do my best! Thanks. I had wondered about a macro which would execute Ctrl+right-arrow a set number of times according to user-input, but of course Ctrl+right-arrow recognises punctuation as words too, doesn't it. A strange situation, that, or so it seems to my simple brain... Thanks again for your help. Bert www.bertcoules.co.uk |
#16
|
|||
|
|||
Go to a word at a particular number?
Doug Robbins wrote:
...I guess all you can do is add some allowance for punctuation on top of the 4000. Doug, I've been playing around with the whole word count utility. I hadn't previously realised that it counts any item which is preceded and succeeded by spaces as a word: so, for example, "one - two - three" is reported as five words, which it patently is not. Short of a macro which first counts everything which Word regards as words then tallies up all the included non-words and subtracts them from the count, do you know of any way to obtain a genuine word-count? Bert www.bertcoules.co.uk |
#17
|
|||
|
|||
Go to a word at a particular number?
Bert,
The following will come closer to selecting the actual number of words that are entered into the input box. Dim wordnum As Long Dim i As Long Dim wordrange As Range Dim source As Document Dim realwords As Long Set source = ActiveDocument wordnum = InputBox("Enter the number of the word to which you want to go", _ "Go to Word Number", 1) Set wordrange = source.Range wordrange.End = source.Words(wordnum).End wordrange.Select Set Temp = Dialogs(wdDialogToolsWordCount) Temp.Execute realwords = Temp.Words Set Temp = Nothing i = 1 Application.ScreenUpdating = False Do While realwords wordnum Set wordrange = source.Range wordrange.End = source.Words(wordnum + i).End wordrange.Select Set Temp = Dialogs(wdDialogToolsWordCount) Temp.Execute realwords = Temp.Words i = i + 1 Set Temp = Nothing Loop Application.ScreenRefresh Application.ScreenUpdating = True Depending upon the number of "bogus" words it may take a little while to run. Note however that one - two - three will still count as 5 words. On the other hand one-two-three will count as 1 word. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Bert Coules" wrote in message ... Doug Robbins wrote: ...I guess all you can do is add some allowance for punctuation on top of the 4000. Doug, I've been playing around with the whole word count utility. I hadn't previously realised that it counts any item which is preceded and succeeded by spaces as a word: so, for example, "one - two - three" is reported as five words, which it patently is not. Short of a macro which first counts everything which Word regards as words then tallies up all the included non-words and subtracts them from the count, do you know of any way to obtain a genuine word-count? Bert www.bertcoules.co.uk |
#18
|
|||
|
|||
Go to a word at a particular number?
Doug,
Thanks so much for that; I certainly didn't expect a custom-written reply. A very peaceful and prosperous new year to you. Bert www.bertcoule.co.uk |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I set right and left alignment on the same line in Word? | Matador | Page Layout | 1 | November 9th, 2005 08:32 PM |
how do i set up template in vbeditor without proggramming language | ARRRGH | New Users | 4 | October 1st, 2005 03:19 AM |
Can Wordperfect templates be converted to Word template docs | Terrill | New Users | 2 | September 14th, 2005 09:14 PM |
Need Subforms? | AccessRookie | Using Forms | 7 | April 8th, 2005 09:30 AM |
Continuous breaks convert to next page breaks | Jennifer Hunt | General Discussion | 2 | December 30th, 2004 05:45 PM |