A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Word » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Go to a word at a particular number?



 
 
Thread Tools Display Modes
  #11  
Old December 30th, 2005, 07:16 PM posted to microsoft.public.word.newusers
external usenet poster
 
Posts: n/a
Default 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  
Old December 30th, 2005, 07:34 PM posted to microsoft.public.word.newusers
external usenet poster
 
Posts: n/a
Default 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  
Old December 30th, 2005, 07:41 PM posted to microsoft.public.word.newusers
external usenet poster
 
Posts: n/a
Default 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  
Old December 30th, 2005, 08:40 PM posted to microsoft.public.word.newusers
external usenet poster
 
Posts: n/a
Default 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  
Old December 30th, 2005, 08:56 PM posted to microsoft.public.word.newusers
external usenet poster
 
Posts: n/a
Default 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  
Old December 31st, 2005, 12:19 PM posted to microsoft.public.word.newusers
external usenet poster
 
Posts: n/a
Default 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  
Old December 31st, 2005, 03:50 PM posted to microsoft.public.word.newusers
external usenet poster
 
Posts: n/a
Default 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  
Old December 31st, 2005, 04:23 PM posted to microsoft.public.word.newusers
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 11:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.