GetCurrWrd {DescTools}R Documentation

Get a Handle to a Running Word Instance

Description

Look for a running Word instance and return its handle. NULL is returned if nothing's found.

Usage

GetCurrWrd()
GetCurrXL()

Value

a handle (pointer) to the running Word, resp. Excel instance.

Note

Closing an instance does not update the value of the pointer. So it may contain an invalid address. Whether the pointer is still valid can be checked by IsValidWrd.

Note

This does unfortunately not work with RDCOMClient (but it would with rcom)! Any better idea out there?

Author(s)

Andri Signorell <andri@signorell.net>

See Also

GetNewWrd, IsValidWrd

Examples

## Not run: # Windows-specific example

x <- rnorm(100)

wrd <- GetCurrWrd()

if(IsValidWrd(wrd)){ 
  Desc(x, wrd=wrd)
} else {
  print("GetCurrWrd: no running word instance found...")
}

## End(Not run)

[Package DescTools version 0.99.24 Index]