-1
지금까지 매크로를 사용하여 Excel 목록에있는 모든 사람에게 전자 메일을 보내고 있습니다. 몇 가지 더 추가해야 할 경우를 제외하고는 제대로 작동합니다.VBA의 내용을 건너 뛰는 방법
1, 날짜가 세포 (r, 4) 인 경우에만 사람에게 전자 메일을 보냅니다. 값은 오늘 +7 일과 오늘 +14 일 사이에 있으면 그 행을 건너 뜁니다. "거짓"
3 "참"으로 행 스킵의 세포 (R 20) .Value의
가2 이메일이 전송 된 경우 변경 값 세포이다 (R 20) .Value는 지금까지 것처럼 보이는데 Heres는 방법
"참":
Sub SetupAppointmentList()
' adds a list of appontments to the Calendar in Outlook
Dim olApp As Outlook.Application
Dim olAppItem As Outlook.AppointmentItem
Dim r As Long
DeleteNotices ' deletes previous test appointments
On Error Resume Next
Set olApp = GetObject("", "Outlook.Application")
On Error GoTo 0
If olApp Is Nothing Then
On Error Resume Next
Set olApp = CreateObject("Outlook.Application")
On Error GoTo 0
If olApp Is Nothing Then
MsgBox "Outlook is not available!"
Exit Sub
End If
End If
r = 10 ' first row with data in
While Len(Cells(r, 1).Formula) > 0
Set olAppItem = olApp.CreateItem(olAppointmentItem)
With olAppItem
.MeetingStatus = olMeeting
' set default appointment values
.Start = Now
.End = Now
.Subject = "No subject"
.Location = ""
.Body = ""
.ReminderSet = True
On Error Resume Next
.Recipients.Add Cells(r, 3).Value
.Recipients.ResolveAll
.Start = Cells(r, 4).Value + Cells(r, 5).Value
.End = Cells(r, 4).Value + Cells(r, 6).Value
.Subject = "Interview"
.Location = Cells(r, 13).Value + ", " + Cells(r, 14).Value
.Body = "Hi.... Blah Blah Blah"
.ReminderMinutesBeforeStart = 30
.Categories = "Notice"
On Error GoTo 0
.Save
.Display
'.Send
End With
r = r + 1
Wend
Set olAppItem = Nothing
Set olApp = Nothing
End Sub
당신이 도와 수 있기를 바랍니다, 미리 감사드립니다!
고마워, 메신저 여전히 아주 새로운 물건을 보냈습니다. Im는 아닙니다 entirly 어떻게 또는 어디에서 나의 부호에서 이것을 두어야하는지 확인하십시오. – Rardo