| GetCurrWrd {DescTools} | R Documentation |
Look for a running Word instance and return its handle. NULL is returned if nothing's found.
GetCurrWrd() GetCurrXL()
a handle (pointer) to the running Word, resp. Excel instance.
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.
This does unfortunately not work with RDCOMClient (but it would with rcom)! Any better idea out there?
Andri Signorell <andri@signorell.net>
## 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)