J
Jules
Hi,
I am trying to set up a macro which opens the email header in a Word
document and then copies some text from the document to the "To" line and the
"Subject" line.
So far I have the following
Selection.HomeKey unit:=wdStory
Selection.EndKey unit:=wdLine, Extend:=wdExtend
Selection.Cut
ActiveWindow.EnvelopeVisible = Not ActiveWindow.EnvelopeVisible
Selection.Paste
This works fine to copy the first line of the document (the email address)
into the "To" line of the email, however, I now can not work out the code to
set the focus back to the document to copy/cut the Subject text and then set
the focus to the "Subject" line to paste. I have tried setting bookmarks in
the document and going back to them, but this doesn't seem to work - my
cursor just stays in the "To" line of the email header.
Does anyone have any suggestions on how to do this please?
Thanks for your help
I am trying to set up a macro which opens the email header in a Word
document and then copies some text from the document to the "To" line and the
"Subject" line.
So far I have the following
Selection.HomeKey unit:=wdStory
Selection.EndKey unit:=wdLine, Extend:=wdExtend
Selection.Cut
ActiveWindow.EnvelopeVisible = Not ActiveWindow.EnvelopeVisible
Selection.Paste
This works fine to copy the first line of the document (the email address)
into the "To" line of the email, however, I now can not work out the code to
set the focus back to the document to copy/cut the Subject text and then set
the focus to the "Subject" line to paste. I have tried setting bookmarks in
the document and going back to them, but this doesn't seem to work - my
cursor just stays in the "To" line of the email header.
Does anyone have any suggestions on how to do this please?
Thanks for your help