How to use Selection function in Word COM for C#?

  • Thread starter Thread starter bob
  • Start date Start date
B

bob

I asked a question yesterday about how I would parse a
Word document using functions in some Interop.Word COM.

Some told me to run a macro in Word to see how it works.

Most of the code was...

Selection.Find.ClearFormatting
With Selection.Find
 
whoops... guess i shouldnt use the tab button.

anyways as i was saying... most of the code was....

Selection.something

And I was wondering how i can use the Selection function.

in my code i wrote...

_Document document = application.Documents.Open()

and from there i could always use...

document.Range() or document.First.Words.Copy() ..etc...

so to do the same thing with Selection should i write...

Selection select = ?

set that equal to something and then from there use
select.ClearFormatting() or whatever function from
Selection I need?

if so, what would set Selection equal to?
 
Back
Top