How to enter the text at new page of word documnet

hi,

I need to move some of the text from page 1 to page 2 in the Word document. Any suggestions?

Please consider as urgent.

Hello mani,

  1. Use the “Open Application” activity to open Microsoft Word
  2. Use the “Word Application Scope” activity to load the Word document you want to work with
  3. Find the Text you want to move so Use the appropriate method to find and select the text you want to move. You can use activities like “Find Text Position”, “Get Text”, or “Select Range” to accomplish
  4. Once you have the text selected, use the “Send Hotkey” activity to send the Ctrl + X (cut) shortcut keys to cut the selected text
  5. navigate to the page where you want to paste the text. This might involve sending keystrokes to navigate to the next page
  6. Paste the Text
  7. Save word doc

Please llet me know if this help’s you.

is there any method which can we use without opening word doc? or any c# code?

1 Like

@manipreethi410

  1. Read the Word document using the “Read Text File” activity to read the content of the document and store it in a string variable (let’s call it documentContent).
  2. Manipulate the text to move the desired content from page 1 to page 2. You can use string manipulation techniques to find and remove the text from page 1, then insert it at the desired location on page 2.ie,
  • Identify the text or elements you want to move on page 1 → use activities like “Find Text Position” or “Get Text” to locate specific text on page 1. These activities will help you identify the text you want to move.

  • Remove or cut the identified text from its current location → you can use string manipulation methods or regular expressions to remove the text from the document content string variable. Alternatively, you can use activities like “Replace” to replace the text with an empty string, effectively removing it. If you want to preserve the text for later use, you can store it in another variable.

  • Insert or paste the text into the desired location on page 2 → If you know the structure of your document and how to navigate to page 2 reliably, you can use activities like “Send Hotkey” with shortcuts like Ctrl+G (Go To) and enter the page number to navigate to page 2 programmatically. Once you’re on page 2, you can use activities like “Type Into” to paste the previously removed text into the desired location.

  1. Write the modified text back to the Word document using the “Write Text File” activity.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.