how to get WORD content

J

Jed

I want to get WORD content like this
"1.the test
2.hello
3.good"

I used code like this
"oDoc=new Word.Document();
string strContent = "";
strContent = oDoc.Content.Text;"
But what I get is
"the test
hello
good"
it lost"1.2.3.",how could I do to get
what I want?Thanks.
 
D

Doug Robbins

Use the ActiveDocument.ConvertNumbersToText to convert the numbers to text..

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Jed

thank you very much for your help , i test it as you said . now,i can get it
as i want .
but when i use the ActiveDocument.ConvertNumbersToText ,it's parameter like
this
"object x="3";
oDoc.ConvertNumbersToText (ref x);
strContent = oDoc.Content .Text ;"

but when the word like this :
"1.test
2.hello
â—†good
â—†well
3.better"
it can't get the sign" â—†",i see the MSDN
,"ActiveDocument.ConvertNumbersToText "
has three parameter :wdNumberParagraph ;
wdNumberListNum Default value for LISTNUM fields;
wdNumberAllNumbers Default value for all other cases

could you tell me ,if i want to get the sign "â—†",how can i do .

thank you again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top