萬盛學電腦網

 萬盛學電腦網 >> Excel教程 >> excel綜合 >> 將文本轉換為電子郵件的VBA代碼

將文本轉換為電子郵件的VBA代碼

  以下代碼可循環訪問一列范圍數據,並將每個條目轉換為一個電子郵件地址。

  Dim convertRng As Range

  'Change the range to suit your need.

  Set convertRng = Range("Z1:Z99")

  Dim rng As Range

  For Each rng In convertRng

  If rng.Value <> "" Then

  ActiveSheet.Hyperlinks.Add rng, "mailto:" & rng.Value

  End If

  Next rng

copyright © 萬盛學電腦網 all rights reserved