.
after I want to transfer emails from one existing folder to one or more subfolders Simple examples : An email comes from John Doe (who can not be in existence) to a MMYY subfolder, under the named Dow, John (which can not be in existence), under the name John. Email is of high importance, then put a copy of the email into a 2 subfolder called "HighImportance". Lastly if the email is identified as a HighVolumeEmailer with an SQL query, move it to a 3 subfolder called "HighVolumeEmailer". VBA runs an email for an MMYY folder, but it can possibly save copies of the same email to two other folders. Overall three. This is my code does not work:
Set objDestFolder = objSourceFolder.folders (sSenderName) If objDestFolder set Objiststolder = objSourceFolder then nothing. Folders Add end (sSenderName) if objNewFolder = objDestFolder.folders (sMonthandYearOfEMail) set if objNewFolder is nothing then set objNewFolder = objDestFolder.folders.Add (sMonthandYearOfemail) end if objVariant.Move objNewFolder 'count # items moved lngMovedItems = lngMovedItems + 1 'that is put high importance folder high importance folder if sEMailImportance = "high" then' '' 'MyCopiedItem = objVariant set' '' '' 'Objaststolder set objSourceFolder.folders (sSenderName) set Do objHighImportanceFolder = objNamespace.folders (sSenderName) .folders (sMonthandYearOfEMail) .folders ( "MarkedHighImportance") '' '' 'set objHighImportanceFolder = ObjDestFolder.folders ("MarkedHighImportance") objHighImportanceFolder is nothing, set ob JHighImportanceFolder = objNamespace.folders (sSenderName). Folders (sMonthandYearOfEMail). Add (sMarkedHighImportance) end if objVariant.UnRead = True set copy = objVariant.copy copy.Move.objHighImportanceFolder objVariant.UnRead = True End If '' '' '' Now sEMailSubject = objVariant.Subject to call high volume blnHighVMVolume = False LookingForThisTelephoneNumberInHighVolume = Mid (sEMailSubject, 24, 10) G = L bound (vArray, 2) UBound (vAray, 2) to g = 0 'this is where the code if the phone number of the population of high call volume, It will determine if vArray (0, g) = LookingForThis telephone number is high then blnHighVMVolume = True numberOfHighVolumeVMs = vArray (1, g) end if next g BlnHighVMVolume = true then set myCopiedItem = objVariant.Copy objHighVolumeFolder = objNamespace.folders (sSenderName) .folders (sMonthandYearOfEMail) .folders (sHighVolumeCaller) if objHighVolumeFolder is nothing, then set OhbHivVolumeFolder = Objanspace.folders (SSN) ). Folders (SMantheth eureofmail) Add (Sachivolumcolr) end if objVariant.UnRead = True set copy = objVariant.copy copy.Move.objHighVolumeFolder objVariant.UnRead = True End If
No comments:
Post a Comment