Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Does Word have Keyboard Merges like Word Perfect does? | Mailmerge | |||
Word2000 letterhead merge | Mailmerge | |||
Underscore (_) will not always display in RTF files (Word 2002). | Microsoft Word Help | |||
Envelope Address | New Users | |||
letters - ask/fillin | New Users |