ASKER
Private arrDataForRules As Variant
Private Sub Application_Startup()
Set xlApp = CreateObject("Excel.Application")
If xlApp = "Microsoft Excel" Then
Else
With xlApp
.Visible = True
.EnableEvents = False
End With
End If
strFile = "C:\Personal\OutlookData\OutlookRuleFileEmails.xlsm"
On Error GoTo openit
If sourceWB.Name <> "OutlookRuleFileEmails.xlsm" Then
openit:
Set sourceWB = xlApp.Workbooks.Open(strFile) ', , False, , , , , , , True)
Set sourceWS = sourceWB.Worksheets("EmailRule")
sourceWB.Activate
sourceWS.Activate
Set myRange = Range(Range("B1"), Range("C" & Cells.Rows.Count).End(xlUp))
arrDataForRules = myRange
End If
End Sub
Sub Macro()
arrD = arrDataForRules ' so you can see the values in the Locals Window
For Idx = LBound(arrDataForRules) To UBound(arrDataForRules)
MsgBox arrDataForRules(Idx, 1)
MsgBox arrDataForRules(Idx, 2)
Next
End Sub
Regards
ASKER
ASKER
ASKER
ASKER
Microsoft Outlook is a personal information manager from Microsoft, available as a part of the Microsoft Office suite. Although often used mainly as an email application, it also includes a calendar, task manager, contact manager, note-taker, journal, and web browser.
TRUSTED BY
Could you be more precise
Which OL version you have?
What do you want to do with the array data, if not in the array what should the rule do?
Regards