0

我有下面的代码从excell发送一封电子邮件,该电子邮件在邮件正文中具有选定的活动工作表范围

  Sub Ticke_status_mail()

   ' Select the range of cells on the active worksheet.
   ActiveSheet.Range("A12:J74").Select

   ActiveWorkbook.EnvelopeVisible = True

   With ActiveSheet.MailEnvelope
      .Item.To = "xxxx@yyy.com"
      .Item.subject = "Ticket status on " & ActiveSheet.Range("today").Value
      .Item.Send
   End With
End Sub

但也在发送不应在邮件中出现的选定范围中的隐藏行,有人可以帮助选择该范围内的可见单元格吗......

4

1 回答 1

1

尝试ActiveSheet.Range("A12:J74").SpecialCells(xlCellTypeVisible).select

于 2013-06-05T08:09:42.400 回答