Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5849917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T13:04:05+00:00 2026-05-22T13:04:05+00:00

Is there a way to replace the nth (given occurrence) of a text in

  • 0

Is there a way to replace the nth (given occurrence) of a text in MS Word document using C#’s

Application.Selection.Find.Execute Method?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T13:04:05+00:00Added an answer on May 22, 2026 at 1:04 pm

    No, that method alone cannot accomplish your goal as it only allows all, none, or first replacement. But the API suite is total is more than powerful enough to do what you want to do, you just have to fiddle with it until you find the right API calls to get what you want.

    Here are some important documents:

    • Working with Text in Documents
    • How to: Search for Text in Documents
    • How to: Loop Through Found Items in Documents

    The first link is the overview. In particular, you need to combine the calls in the second two to do what you want: loop using a search, stop and do a replace and the selected text at your desired occurrence. Using a new complex API can be difficult but use the examples and search for API methods for similar code to get ideas.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to replace any keyword in a text file using POSIX
Is there any way to replace the WCF service application built-in JavascriptSerializer with Newtonsoft
Is there a way to search and eventually search and replace text in Visual
Is there a lazy way I can quickly replace all instances of a word
Is there an easy way in Emacs to search and replace text in an
Is there a way to replace the legacy text IDoc files with XML IDoc
Is there a way to replace all the brush definitions for a WPF application
Is there any way to replace a content using jQuery from - let's say,
Is there a way to replace the phone lock application of an Android phone
Is there a way to replace the normal text within a table element that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.