Results 1 to 22 of 22

remove the cell selection border after copying cell

Threaded View

  1. #1
    Registered User
    Join Date
    11-12-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    21

    remove the cell selection border after copying cell

    hello... i have a code below which works perfectly copying the contents in rage B4 to C4 to the email body but I need to remove the cells copy selection border from being shown in the excel sheet after copying the cells . Also, how can I control the row selection in this code? I think I need to change the xlDown to let say stop the selection at B30 and C30

    any chance you can help me out guys? thanks in advance!

    Sub CreateMail()
    
        Dim objOutlook As Object
        Dim objmail As Object
        Dim rngTo As Range
        Dim rngCc As Range
        Dim rngSubject As Range
        Dim rngBody As Range
    
        Set objOutlook = CreateObject("Outlook.Application")
        Set objmail = objOutlook.createitem(0)
    
        With ActiveSheet
            Set rngTo = .Range("B1")
            Set rngCc = .Range("B2")
            Set rngSubject = .Range("B3")
            Set rngBody = .Range(.Range("B4"), .Range("C4").End(xlDown))
        End With
        rngBody.Copy
    
        With objmail
            .To = rngTo.Value
            .CC = rngCc.Value
            .Subject = rngSubject.Value
            .Display
        End With
        SendKeys "^({v})", True
    
        Set objOutlook = Nothing
        Set objmail = Nothing
        Set rngTo = Nothing
        Set rngCc = Nothing
        Set rngSubject = Nothing
        Set rngBody = Nothing
    
    End Sub
    Last edited by michibahn; 05-14-2015 at 03:53 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy and paste Excel range as picture into Outlook email body using excel vba
    By ExcelDoc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-17-2016, 09:29 PM
  2. Copy and paste text and a chart into Html Email body
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2014, 09:22 AM
  3. Help with Copy Range from Tab and Paste In Outlook Email Message Body.
    By N4VBA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2014, 03:40 PM
  4. Is there a way to Copy And Paste Excel Range As Picture Into Outlook Email Body Using Exc
    By dineshsachidananda in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2014, 09:00 AM
  5. [SOLVED] Vba code copy range and paste special in email body
    By Webman1012 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2013, 12:48 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