Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Clipboard to Introduction Field using VB Script in Word 2003

1 view
Skip to first unread message

jugenjury

unread,
Jul 19, 2009, 8:57:01 PM7/19/09
to
I have been trying everything I can, but I can not figure out how to get the
contents of the system clipboard into the Introduction Field using a Visual
Basic script in Microsoft Word 2003.

I have a form that gets compiled by a MS Word VB Script, then formatted and
saved as an HTML page. The VB Script then opens this new HTML page as a new
document.

From there, I can get it to send the email to the proper recipient with no
problem. I can also insert static text into the Introduction Field.
Everything works fine. My problem comes from having to copy snippets from
another document and paste it into the Introduction Field before sending. As
it works now, I have the script stop with a MsgBox dialog reminding me to
make sure the needed text was copied to the clipboard. When I click the OK
for that, it continues and accesses the clipboard. I just can't figure out
how to get that content to the Introduction.

Here is what I have for the mail sending part:

Sub SendMail(ByVal strRec As String)
With Application.ActiveDocument.MailEnvelope
.Introduction = "This is where I'd like to paste from the clipboard"
With .Item
.Recipients.Add strRec
.Subject = "POTD"
.Send
End With
End With
End Sub

mackm...@gmail.com

unread,
Jan 16, 2017, 1:34:36 AM1/16/17
to
0 new messages