+ Reply to Thread
Results 1 to 8 of 8

Pasting Range into Emial body as PDF

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    648

    Pasting Range into Emial body as PDF

    ON one of my sheets I have a macro that pastes a certain range of cells on clipboard then you open outlook and paste it into the body.

    The problem is formats sometimes gets lost and others change the info after it is pasted.

    Sub Covercopypaste()
    Range("b1:h46").Select
    Selection.Copy

    End Sub


    What I would like it to do:

    Once you click the button it copies the sheet and converts into PDF then pastes it into the body of an email

    The recipient should be reports@sharewell.com
    They can add the subject line them selves

    This is all to start with and once this works I can go from there

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Pasting Range into Emial body as PDF

    pdf is a file type. Try this:
    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    648

    Re: Pasting Range into Emial body as PDF

    Is it possible to change into PDF before it Pastes into Outlook that way people cannot edit the email body that gets pasted for the excel sheet.

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Pasting Range into Emial body as PDF

    You can attach it as a pdf. pdf is a filetype so you can only create a file. The body of an email is either written in simple text or in html. It doesn't have its own filetype.

    You can set the macro to send the email automatically instead of displaying it. This will prevent them from being able to edit it.

  5. #5
    Registered User
    Join Date
    08-08-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Pasting Range into Emial body as PDF

    I have no idea wht RangetoHTML function is but it is working fine for me... thanks to whoever wrote it!!!!

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Pasting Range into Emial body as PDF

    It changes the range you would like to email into HTML (Hyper Text Markup Language) which is a format the Outlook recognizes for the body of it's emails.

  7. #7
    Registered User
    Join Date
    08-08-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Pasting Range into Emial body as PDF

    Hi Solus,

    I have a question again about RangetoHTML...

    Does this function not work if you have an email to work upon through Reply All?

    The function works fine if I am creating a new email. I have another macro through which I found an email based on the subject, then replied all and tried to use RangetoHTML to paste the range from Excel sheet in that email...

    THe code RangetoHTML appears to work fine until the very end but then gives an error at the last but one line ( Just before End Function!) but nothing is written in the email....


    Any idea about this behavior? Can you help me with this strange problem?

    Thanks in advance!

    Regards,
    Ganesh K

  8. #8
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Pasting Range into Emial body as PDF

    @gkumthekar

    Please start a new thread with an appropriate thread title and describe your issue.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Send Email 1 sheet as attachment and other sheet as body of emial.
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-19-2013, 02:57 AM
  2. Pasting data from a worksheet into the body of an email.
    By CTroendly in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2012, 04:28 PM
  3. Copying Mulitple Ranges, Pasting to body of Email
    By Master Blaster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2012, 01:57 AM
  4. Replies: 7
    Last Post: 08-11-2012, 02:39 PM
  5. Pasting Range from worksheet into Body of Email Message
    By AZGryphon in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-10-2012, 06:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1