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 / February 2007

Tip: Looking for answers? Try searching our database.

Move to Previous Row in Table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rich Hutchins - 14 Feb 2007 13:37 GMT
This just HAS to be a dumb question. I've looked around, but haven't had much
luck finding what I hope is an equally dumb answer.

I have a macro that inserts a new row into a table and that much of it works
fine. When the new row gets inserted into the middle of a table, the cursor
is actually put in the row beneath the new row. Normally, not a problem.
However, I want to put a bookmark around the newly inserted row, but I'm
having a heck of a time trying to figure out how to tell the cursor (or
selection or range or whatever) to go to the previous row (the newly inserted
one) so I can select it and insert the bookmark.

I have no issue inserting the bookmark around an entire row, just not the
NEW (previous) row.

Can anybody help?
Helmut Weber - 14 Feb 2007 15:53 GMT
Hi Rich,

selection.InsertRowsBelow
selection.MoveUp

or have I overlooked something?

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

Rich Hutchins - 14 Feb 2007 17:04 GMT
Hi Helmut,

Nope, you were right on. I knew it would be something simple like that, but,
still being somewhat new to Word VBA programming, I wasn't looking in the
right place. I was convinced it would be something like Row.Previous, but
that wasn't working for me.

Thanks so much for your help.

Rich

> Hi Rich,
>
> selection.InsertRowsBelow
> selection.MoveUp
>
> or have I overlooked something?
 
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.