Jump to content

How to select and mark text in MS Word


Recommended Posts

; Please create a file 'test.doc' on desktop


$wordApp = ObjCreate("word.application")
$wordApp.CommandBars("Standard" ).Visible = True
$wordApp.CommandBars("Formatting" ).Visible = True


$odoc = $wordApp.Documents.Open(@DesktopDir & "\Test.doc")


$wordApp.Visible = True
$wordApp.Top = 79
$wordApp.Height = 375 + 100
$wordApp.WindowState = "wdWindowStateNormal"
$odoc.TrackRevisions = False

$odoc.Range.insertAfter('how to select and mark this text')

Hi,

I am trying to open word, insert some text and then select it. I am unable to select the text as I would with a mouse or keyboard. Please help me if there is a way to achieve this.

Please create a test.doc file to test script.

Regards

Ajit

Edited by ajit
Link to comment
Share on other sites

http://msdn.microsoft.com/en-us/library/aa211954%28v=office.11%29.aspx

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...