C# Word copy style from one paragraph to another -


in word have 2 paragraphs, , i'm trying copy formatting 1 other.

i've tried:

word.style style = activedocument.paragraphs[2].get_style() word.style; activedocument.paragraphs[1].set_style(style); 

and

word.style style = activedocument.paragraphs[2].range.characterstyle word.style; activedocument.paragraphs[1].range.set_style(style); 

this doesn't copy style though, , first paragraphs style set default text styling. how proper styling information?

i think paragraph[2].get_style() return normal style (default text) because of paragraph[2] style normal (default text)!! you change formatting text not save style! style of paragraph[2] not change default value. see style name in msword , create new style apply it, 1 variant work fine.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -