Web Development
3 replies
In your word document create a macro that will open an outlook application, create a new mail item and pass the selected text from word document to the outlook message item.
Your code in word would look like this:
[Go to Tools->References and check item Microsoft Outlook Object Library]
Private Sub CreateMailItem()
Dim sBodyText As String
Dim oOutlookApp As New Outlook.Application
Dim oMsg As Outlook.MailItem
'presuming you selected some text in Word
sBodyText = Selection.Text & ""
'Create a message.
Set oMsg =oOutlookApp.CreateItem(olMailItem)
With oMsg
.Body = sBodyText
.Display
End With
Set oOutlookApp = Nothing
End Sub
Good books for this are:
1.Microsoft Office 2000/Visual Basic Language Reference
2.Microsoft Office 2000/Visual Basic for Applications Fundamentals
3.Microsoft Office 2000 VBA Fundamentals/Mastering Solution Set
4.Microsoft Mastering: Microsoft Office 2000 Development
by hurdk
This code works very well.
I give the answer a very high rating.
In my case I had to shade the text initially. I had text form fields
in the document.
by hurdk
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending