I am trying to create the macro in Word 2003 which allows you to create an email in Outlook 2007 and put the Word document in the body of the email.
I have seen the script here and got it working:
However the script just generates an email with the default to, subject etc in it and sends it immediately. I need the script to pop up the Outlook email so i can enter the to adress, subject etc and preview the body text.
I have absolutely no VB experience or knowledge and don't have a clue how I can make this happen. Could anyone help?
Dim bStarted As Boolean
'Dim oOutlookApp As Outlook.Application
'Dim oItem As Outlook.MailItem
On Error Resume Next
'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
'Outlook wasn't running, start it from code
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
'Create a new mailitem
Set oItem = oOutlookApp.CreateItem(olMailItem)
'Set the recipient for the new email
.To = "email@example.com"
'Set the recipient for a copy
.CC = "firstname.lastname@example.org"
'Set the subject
.Subject = "New subject"
'The content of the document is used as the body for the email
.Body = ActiveDocument.Content
If bStarted Then
'If we started Outlook from code, then close it
Set oItem = Nothing
Set oOutlookApp = Nothing