
Open word doc and cut and paste
For another project I am doing, I would like to be able to
a) open a word document from excel
b) copy some text across
c) let excel carry on when the document has been closed
For part b) I was going to put the text into the clipboard (this is
easy) and use SendKeys, but I can't see this being reliable. I could
create is as a mail merge document, but this seems excessive - is there
an easier way
For a) and c) I am using something called ShellAndWait I picked up off
the net. This is just basically the Shell command with a few APIs
around it which get various handles, and loop until the process dies,
but I'd prefer to use automation if this helps with my answer to b).
If I am to paste the text in rather than mailmerge, I take it I just
need chr(13)'s where I want the carriage returns to be (I am pulling
addresses from cells on a spreadsheet and want to print this as an
address label)
--
Mike