Emailing selected cell range using outlook
Solved/Closed
suryam
-
Apr 28, 2011 at 03:37 PM
RWomanizer Posts 365 Registration date Monday February 7, 2011 Status Contributor Last seen September 30, 2013 - May 2, 2011 at 12:39 AM
RWomanizer Posts 365 Registration date Monday February 7, 2011 Status Contributor Last seen September 30, 2013 - May 2, 2011 at 12:39 AM
Related:
- Emailing selected cell range using outlook
- Outlook free download - Download - Email
- How to refresh outlook email - Guide
- Clear only the formatting from the selected cell (leaving the content) - Guide
- Outlook sign up - Guide
- Emojis in outlook - Guide
7 responses
RWomanizer
Posts
365
Registration date
Monday February 7, 2011
Status
Contributor
Last seen
September 30, 2013
120
Apr 29, 2011 at 01:35 AM
Apr 29, 2011 at 01:35 AM
which version of MS Word you are using?
RWomanizer
Posts
365
Registration date
Monday February 7, 2011
Status
Contributor
Last seen
September 30, 2013
120
Apr 29, 2011 at 02:03 AM
Apr 29, 2011 at 02:03 AM
Hi Suryam,
Here is the code:
the code work as follows:
it select the invoice range which you given,
import the file to pdf and save it.
now create a mail and attach the file.
than save it to draft.
Note: Change subject line and massage body as according to you.
Cheers, :)
Rahul
Here is the code:
the code work as follows:
it select the invoice range which you given,
import the file to pdf and save it.
now create a mail and attach the file.
than save it to draft.
Note: Change subject line and massage body as according to you.
Sub PdfMail() Dim OutApp, OutMail As Object Dim Inv As Long Dim MItem As Object Dim Fname As String Sheets("INVOICE").Select Inv = Mid(Range("f17"), 9, 4) Fname = "D:\" & Inv & ".pdf" Range("B6:F52").Select Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Fname, _ Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _ :=False, OpenAfterPublish:=False Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next ' Create Mail Item and send it With OutMail .To = "" .Subject = "Invoice Details" ' CHANGE SUBJECT LINE HERE ' CHANGE MSG HERE .Body = "Hey boss," & vbNewLine & vbNewLine & "Heres the PDF file you wanted." _ & vbNewLine & vbNewLine & "Regards," & vbNewLine & "Rahul" .Attachments.Add Fname .Save 'to Drafts folder End With Set OutlookApp = Nothing Kill Fname End Sub
Cheers, :)
Rahul
Hi code looks good. Might work for me. But when I used it, it is "starting the MS outlook 2007" . I am using MS Outlook express 6. To be frank with you , I donot know the difference between these two versions.
Here I want to make it clear that I don't want to distrub the connection settings which are already set on my computer...bcoz we have a shared network for 10 people. I donot want to be blamed by my office people for chainging the outlook express 6 settings. Can you pls settle my issue without going to MS outlook 2007? or suggest me something else so that my purpose is met. ok thanks for your cooperation
bye suryam
Here I want to make it clear that I don't want to distrub the connection settings which are already set on my computer...bcoz we have a shared network for 10 people. I donot want to be blamed by my office people for chainging the outlook express 6 settings. Can you pls settle my issue without going to MS outlook 2007? or suggest me something else so that my purpose is met. ok thanks for your cooperation
bye suryam
Didn't find the answer you are looking for?
Ask a question
RWomanizer
Posts
365
Registration date
Monday February 7, 2011
Status
Contributor
Last seen
September 30, 2013
120
Apr 29, 2011 at 04:27 AM
Apr 29, 2011 at 04:27 AM
Hi Suryam,
As outlook express is not a part of MS office,
sorry i am not fully aware that how to map with outlook express, even i don't have outlook express in my system so i can experiment something.
may some other expert in the form help you regarding this or you can use google search, if successed please paste the code in this form so any other user take benefits of this.
Till than you can use the code upto the save the pdf and manually attach it with your mail.
Regards,
Rahul
As outlook express is not a part of MS office,
sorry i am not fully aware that how to map with outlook express, even i don't have outlook express in my system so i can experiment something.
may some other expert in the form help you regarding this or you can use google search, if successed please paste the code in this form so any other user take benefits of this.
Till than you can use the code upto the save the pdf and manually attach it with your mail.
Sub PdfMail() Dim Inv As Long Dim Fname As String Sheets("INVOICE").Select Inv = Mid(Range("f17"), 9, 4) Fname = "D:\" & Inv & ".pdf" Range("B6:F52").Select Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Fname, _ Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _ :=False, OpenAfterPublish:=False End Sub
Regards,
Rahul
Hi Rahul , thanks very much for your great help. your code best suited to my purpose. I am extremely happy. I have some other new questions also... will be in touch with you soon thru this forum. thanks again...I cannot forget your help....cheers.. bye suryam
RWomanizer
Posts
365
Registration date
Monday February 7, 2011
Status
Contributor
Last seen
September 30, 2013
120
May 2, 2011 at 12:39 AM
May 2, 2011 at 12:39 AM
You are most welcome with your queries in this forum.