Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2004

Tip: Looking for answers? Try searching our database.

Macro question: "Select text"?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rodney Dangerfield - 21 Nov 2004 04:24 GMT
Hi.  I'm new to using the MS-Word Macro function.  (So far, all I've been
doing is using "record macro" feature . . . and I have no code programming
skills . . . so if you can keep your answer SIMPLE I'd sure appreciate
it,guys and gals!)

Ok, here goes . . .

I have a document with around 400 short lines of text.  It looks like this:

Susan Jones
George Smith
Harry Belefonte Harris
Mikey
Bambi L. Peters

WHAT I NEED:
A macro I can put on my toolbar, that will do the following:

(a) "GO-TO" line 260    
   (thisbrings the cursor to the start of line 260)

(b) "SELECT" (or whatever it's called) all of those 260 lines (reason: so
they can then be "copied" to the clipboard in the final step)

(c) "COPY" into Windows Clipboard

Does anyone know how to do this?

PS:  I need SIMPLE instructions, ok guys?  Like: "Just turn on the macro
recorder and do such-and-such".  

I sure appreciate anybody's help!

Bye

Rodney Dangerfield

("I don't get no respect.  No respect at all!  Why, when I was born, I was
real ugly.  How ugly?  Well,let me tell you. I was SO ugly when I was born,
that my mother slapped the doctor!)
Rodney Dangerfield - 21 Nov 2004 04:25 GMT
OOops. I forgot to say this . . (probably important info.)   . . .

The purpose of the macro will always be the same: To SELECT and COPY the
*FIRST* 260 LINES of text into the Windows clipboard.

In other words, we want the *TOP* 260 lines of text in the document.   (They
will never be anywhere else in the document . . . rather, they will ALWAYS
start at the BEGINNING of the document).

- Rodney

> Hi.  I'm new to using the MS-Word Macro function.  (So far, all I've been
> doing is using "record macro" feature . . . and I have no code programming
[quoted text clipped - 36 lines]
> real ugly.  How ugly?  Well,let me tell you. I was SO ugly when I was born,
> that my mother slapped the doctor!)
Helmut Weber - 21 Nov 2004 13:25 GMT
Hi Rodney,
the thing with simple answers is,
that the world and word douments
are often not simple. As a technical writer,
I am always confronted with the challenge
"... must be able, to explain complicated matters
in an easily understandable way." No way!
Either things are simple, or not, then they are complicated.
But I'm getting talkative.
Have a look at this very basic one:
Sub Test777()
With Selection
  .ExtendMode = False
  .HomeKey unit:=wdStory
  .ExtendMode = True
  .GoTo _
  what:=wdGoToLine, _
  which:=wdGoToAbsolute, _
  Count:=21 ' plus 1
  .Copy
End With
End Sub
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
Rodney Dangerfield - 21 Nov 2004 15:29 GMT
Thanks Helmut

Well, I think you are probably right!   (and I'm sure you know LOTS more
about Word programming than I do).

So, thank you very much.

Rodney
("I don't get no respect!")

> Hi Rodney,
> the thing with simple answers is,
[quoted text clipped - 24 lines]
> Word XP, Win 98
> http://word.mvps.org/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.