MS Word Automation [modified] correct and/or add styles to an existing document using template ????
-
Dear All I ma using late binding to Done word parsing I have word document i want to change the style of paragraphs using template docuemtn For exmaple Par(1) style ="This style 1" Par(2) style ="This style 2" My code : Dim o_nullobject As Object = System.Reflection.Missing.Value Dim o_filePath As Object = FilePath''file have paragraphs Dim oTemplate As Object = TemplePath Dim oFalse As Object = False Dim oTrue As Object = True wordApp = CreateObject("Word.Application") doc = CreateObject("Word.Document") alse, o_nullobject, o_nullobject) doc = wordApp.Documents.Open(o_filePath, o_nullobject, oFalse, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, o_nullobject, oFalse, o_nullobject, o_nullobject, o_nullobject, o_nullobject) doc.Activate() ParseWordStyle() Private Sub ParseWordStyle() Try Dim i As Int64 '' Dim style As String Dim parsText As String ''Dim p As Object = doc.Styles[""] For i = 1 To doc.Paragraphs.Count doc.Paragraphs(i).Range.Style ="some style"....... ''''''''''''''''''''''''''''''' my problem How to set paragaphs text of styles from template
Yes. CreatiVity withOuT limiTs
modified on Wednesday, March 18, 2009 6:02 AM