+ Reply to Thread
Results 1 to 4 of 4

PDF as Mail - Range

  1. #1
    Registered User
    Join Date
    02-22-2022
    Location
    Antwerp, Belgium
    MS-Off Ver
    Version 2201
    Posts
    2

    PDF as Mail - Range

    Hi,

    Am alternating a workbook made by a colleague who, since then, has left the company.
    Would like to make a PDF to email from a certain sheet.
    This works fine, however, now I want to make it so that the pdf only shows a set range of cells.
    Cell Range to be C1:K66

    Attached you can find the VBA worksheet as it is now

    , note that following lines were included by myself ( ' DIM rng as range '; ' Set rng = sheets("shoretank").range("C1:K66") ). I believe that these are not in the right position as my PDF still shows all cells in the sheets wich are not hidden.
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,367

    Re: PDF as Mail - Range

    It is also not necessary to check whether the file already exists. It overwrites anyway.

    To keep it compact; below instead of your code:

    Please Login or Register  to view this content.
    Last edited by JEC.; 02-22-2022 at 03:23 PM.

  3. #3
    Registered User
    Join Date
    02-22-2022
    Location
    Antwerp, Belgium
    MS-Off Ver
    Version 2201
    Posts
    2

    Re: PDF as Mail - Range

    Hi,

    Thanks, always good to keep it compact.
    Above code works as a charm, thanks for that!

    cheers

  4. #4
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,367

    Re: PDF as Mail - Range

    You're welcome! Cheers!

+ 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] mail an excel range in mail body
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-26-2017, 05:12 AM
  2. Macros for Mail Range/Selection in the body of the mail along with attachment
    By xenon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2015, 06:29 AM
  3. Replies: 13
    Last Post: 11-05-2014, 03:03 PM
  4. Mail Range/Selection in the body of the mail along with an attachment
    By johnny_canuck in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-27-2013, 05:52 AM
  5. Mail Pictures as Range
    By scottklpl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-15-2011, 03:48 PM
  6. How to e-mail selected row and use e-mail address in a cell to send e-mail from excel
    By syedalamgir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2010, 02:15 AM
  7. E-mail range
    By mikelever in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-08-2007, 07:41 PM

Tags for this Thread

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