TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
chetan Allipur
NA
541
168.8k
How to Find and Replace the word styles in c#
Jul 4 2018 8:41 AM
Range rng = doc1.Content;
rng.Find.ClearFormatting();
rng.Find.Replacement.ClearFormatting();
rng.Find.set_Style(doc1.Styles["Body Text"]);
rng.Find.Forward = true;
rng.Find.Wrap = WdFindWrap.wdFindContinue;
if (rng.Find.Execute())
{
rng.set_Style(doc1.Styles["Heading 1"]);
}
If I have styles in multiple places in document.It is not working.Only first occurrence will work other same styles will not change.
Can anybody tell me?
Reply
Answers (
2
)
Styles Mapping in word VSTO c#.
Create folder with file without directory