View Full Version : Deselecting Text


Evan Stone
02-08-2006, 11:46 PM
Hi,

I'm building out a table, applying ParagraphAlignment settings to its
columns, and when I'm done, the last column is remaining selected, and that
just looks icky. How does one deselect text in a document?

The weird thing is I feel like I've asked this question before, but I can't
seem to locate it or the answer, so bear with me. ;)

Thanks!

evan k. stone | software engineer
----------------------------------------
santa rosa, ca, usa

Evan Stone
02-09-2006, 12:13 AM
solved my own problem again. turns out i was already doing it elsewhere:

// fiddle a bit with the preview so that page 1 is shown
// and text is de-selected.
Word.Selection selection = this.document.ActiveWindow.Selection;
object units = WdUnits.wdStory;
object move = WdMovementType.wdMove;
selection.HomeKey(ref units, ref move);

lol.

evan k. stone | software engineer
----------------------------------------
santa rosa, ca, usa

Cindy M -WordMVP-
02-10-2006, 10:58 AM
Hi Evan,

> I'm building out a table, applying ParagraphAlignment settings to its
> columns, and when I'm done, the last column is remaining selected, and that
> just looks icky. How does one deselect text in a document?
>
> The weird thing is I feel like I've asked this question before, but I can't
> seem to locate it or the answer, so bear with me. ;)
>
The other way (the one I prefer):
.Collapse wdCollapseEnd (or wdCollapseStart)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)