|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 ljh29206 于 2017-2-14 14:46 编辑
Public blnSearchComp As Boolean
Private Sub Application_AdvancedSearchComplete(ByVal SearchObject As Search)
blnSearchComp = True
End Sub
Sub TestAdvancedSearchComplete()
Dim sch As Outlook.Search
Dim rsts As Outlook.Results
Dim i As Integer
blnSearchComp = False
Const strF As String = "urn:schemas:mailheader:subject = 'aaaa' "
Const strS As String = "calendar"
Set sch = Application.AdvancedSearch(strS, strF)
While blnSearchComp = False
DoEvents
Wend
Set rsts = sch.Results
For i = 1 To rsts.Count
MsgBox rsts.Item(i).Start & rsts.Item(i).End
Next
End Sub
以上为 outlook 查找日程的例子,请教 如何修改这个找到的日程直接在
For i = 1 To rsts.Count
MsgBox rsts.Item(i).Start & rsts.Item(i).End
rsts.Item(i).Start = #1/1/2017 12:00#
rsts.Item(i).end = #1/1/2017 14:00#
Next
无效,求指导
|
|