macro help

  • Thread starter pradeep_siemens
  • Start date
P

pradeep_siemens

HI EXPERTS
i have a macro which can send a mail from word. have a small query. the
subject remains always default which we set. The code is
Sub Send_Email_Current_document()

Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
With OutMail
..To = "(e-mail address removed)"
..CC = "(e-mail address removed)"
..BCC = "(e-mail address removed)"
..Subject = "deprogramming- Subject".Body = "ADD TEXT HERE"
..Attachments.Add Activedocument.FullName

..Send
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub

imagine i have document which has a word urgent call. by any chance is
it possible to extract specific words(like the word urgent call must be
the subject) from the document as the subject by itself. it is a bit
tedious to go to vb editor to change the subject often. if that is
possible kindly let me know. plz

illustration
imagine i am sending the follwing content as a mail

MPRN
3013485400
Date
20/03/2009
Time Raised
17.11
END of SLA
20.11
Full Bgas Contact details
*Lucky @bgas on 183762*
Job Description
Call out, Fault Flag, off supply
Customer Name
Miss. Juli A Harison
Customer Tel No
01473437654
Full Address
4
MELROSE GARDENS
IPSWICH
Postcode
IP4 3NZ
Consumer Off Supply?
yes
CC Agent Contact details
Kanthi * 7010
Comments Further details
CARD NOT ACCEPTING ON MTR , OFF SUPPLY, TRIED WITH 3
CARDS



Gas Work Scheduling Use only

Job Issued To


Time Job Issued


Issued By




i wnt to have the subject as
BGT Gas MO Urgent Job Booking Form ( 4, MELROSE GARDENS,
IPSWICH
IP4 3NZ)


WOULD BE GLAD IF ANY ONE CAN HELP
MANY THANKS
PRADEEP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top