Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Word automation - selecting a part of the document

Word automation - selecting a part of the document

Scheduled Pinned Locked Moved C#
questioncsharptestingtoolstutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dptalt
    wrote on last edited by
    #1

    I'm using Word automation to open a document that has some areas protected. I'm trying to figure out how to select the unprotected area of the document. How can this be done? As a solution I recorded a macro inside Word that presses F8 five times which selects the unprotected section as I want. The marco code shows the following: Selection.Extend Selection.Extend Selection.Extend Selection.Extend Selection.Extend What is the syntex in C# if I wanted to use Selection.Extend?

    L 1 Reply Last reply
    0
    • D dptalt

      I'm using Word automation to open a document that has some areas protected. I'm trying to figure out how to select the unprotected area of the document. How can this be done? As a solution I recorded a macro inside Word that presses F8 five times which selects the unprotected section as I want. The marco code shows the following: Selection.Extend Selection.Extend Selection.Extend Selection.Extend Selection.Extend What is the syntex in C# if I wanted to use Selection.Extend?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      dptalt wrote:

      What is the syntex in C# if I wanted to use Selection.Extend?

      http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.selection.extend(office.11).aspx[^]

      D 1 Reply Last reply
      0
      • L led mike

        dptalt wrote:

        What is the syntex in C# if I wanted to use Selection.Extend?

        http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.selection.extend(office.11).aspx[^]

        D Offline
        D Offline
        dptalt
        wrote on last edited by
        #3

        That link does not give me enough information to solve my problem.

        L D 2 Replies Last reply
        0
        • D dptalt

          That link does not give me enough information to solve my problem.

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          Ok, sorry, I guess I was wrong. I won't bother you any more.

          1 Reply Last reply
          0
          • D dptalt

            That link does not give me enough information to solve my problem.

            D Offline
            D Offline
            DidiKunz
            wrote on last edited by
            #5

            dptalt wrote:

            That link does not give me enough information to solve my problem.

            You probably read something about office automation, then it would.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups