Formatting lost!!

Oct 27, 2009 at 10:36 PM

My requirement is i need to load the contents of a word document which is formatted into paragraphs.

Problem Nbr 1 :

When i load the contents of word doc,the formatting is lost.

Problem 2 :

Wheni format it in text editor and save the contents to a word doc,again the formatiing is lost.

 

Help in this regard would be greatly appreciated.

 

Thanks,

Sasanka

Nov 3, 2009 at 9:40 PM

Can some one please help me in this regard?

 

i am using the fllowing code for this...

 

Dim aDoc As Word.Document = WordApp.Documents.Open(outfile, missing, [readOnly], missing, missing, missing, missing, missing, missing, missing, missing, isVisible)

aDoc.ActiveWindow.Selection.WholeStory()

aDoc.ActiveWindow.Selection.CopyFormat()

Rte1.Text = aDoc.ActiveWindow.Selection.Text()

aDoc.Close()

WordApp.Application.Quit()