Consulting

Results 1 to 3 of 3

Thread: Copy Images within Selected Cells

  1. #1
    VBAX Master
    Joined
    Jun 2006
    Posts
    1,091
    Location

    Copy Images within Selected Cells

    I use this code to copy what the user has selected and then the add-in can paste it in the body of an email or in a pdf. However, if there is an picture within the range selected it does not copy over. Is it possible to copy over the image also but only if it is within that range:

    [vba]If frmEmailWork.obWorksheet Then
    Set rngeSend = Range(Cells(1, 1), Cells(fnFinalrow(wsWorking), fnFinalColumn(wsWorking)))
    Else
    Set rngeSend = Range(frmEmailWork.rfRange.Value)
    End If

    Set wsWorking = Worksheets.Add

    rngeSend.SpecialCells(xlCellTypeVisible).Copy
    wsWorking.Range("A1").PasteSpecial xlPasteValues
    wsWorking.Range("A1").PasteSpecial xlPasteFormats

    comResizeAndFit wsWorking 'Resize Columns and Change font to user selected
    pagsetAdjustPageWidth False, False, wsWorking 'Adjust Page Width based on Total Column Widths
    pagsetPrintHeading wsWorking, wsData.PageSetup.CenterHeader, wsData.PageSetup.LeftHeader, _ wsData.PageSetup.RightHeader
    [/vba]
    Thank You,
    Daniel Blois
    http://studenthacker.blogspot.com/

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location

  3. #3
    VBAX Master
    Joined
    Jun 2006
    Posts
    1,091
    Location
    Sorry about the crossposting - did not realize it was an issue. I will follow those guidelines. This issue is now pretty much fixed. However, I have one more issue and that is that when it gets pasted into outlook wherever the picture is supposed to be I get an error that says Out of Memory.

    Please any answers post to my original posting here:

    http://www.excelforum.com/excel-prog...ted-cells.html
    Thank You,
    Daniel Blois
    http://studenthacker.blogspot.com/

Posting Permissions

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