J
Juan Antonio
Hi to the forum...
I have this code that allows to me the access to the text
of each paragraph, in a word document:
foreach Word.Paragraph x in myapp.ActiveDocument.Paragraphs
{
MessageBox.Show("this is the paragraph="+x.Range.Text);
}
I would like to know (if its possible), to make another
foreach statement, inside the before, make possible the
access to each word inside each paragraph...
For the moment i try this (inside the before foreach):
foreach(Word.Words w in x.Range.Words)
{
MessageBox.Show("test");
}
But only obtain an Exception Specific Cast Not Valid...
Anybody Could tell me how can i solve my question??
Thanks in advance.
Kind Regards.
Juan Antonio.
I have this code that allows to me the access to the text
of each paragraph, in a word document:
foreach Word.Paragraph x in myapp.ActiveDocument.Paragraphs
{
MessageBox.Show("this is the paragraph="+x.Range.Text);
}
I would like to know (if its possible), to make another
foreach statement, inside the before, make possible the
access to each word inside each paragraph...
For the moment i try this (inside the before foreach):
foreach(Word.Words w in x.Range.Words)
{
MessageBox.Show("test");
}
But only obtain an Exception Specific Cast Not Valid...
Anybody Could tell me how can i solve my question??
Thanks in advance.
Kind Regards.
Juan Antonio.