Reply
 
Thread Tools Display Modes
  #1   Report Post  
Jed
 
Posts: n/a
Default how to get WORD content

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.
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

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
"Jed" wrote in message
...
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.



  #3   Report Post  
Jed
 
Posts: n/a
Default

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.


"Doug Robbins" wrote:

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
"Jed" wrote in message
...
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.




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Word have Keyboard Merges like Word Perfect does? Donnas Mailmerge 1 June 28th 05 09:30 PM
Word2000 letterhead merge BAW Mailmerge 3 June 25th 05 01:17 PM
Underscore (_) will not always display in RTF files (Word 2002). David A Edge Microsoft Word Help 6 June 14th 05 10:39 AM
Envelope Address GR New Users 5 April 24th 05 09:48 PM
letters - ask/fillin Caroline H New Users 2 February 25th 05 08:19 PM


All times are GMT +1. The time now is 07:46 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"