View Full Version : [SOLVED:] Ativação de Regras
Romulo Avila
11-11-2022, 06:18 AM
Good morning,
I have some rules in Outlook that are disabled due to some problem that I have not yet been able to identify, there is some way via the command line that I can check if the rule is disabled and that I can enable it, because in this way I would create a schedule to do this check.
Thank you
Aussiebear
11-11-2022, 01:02 PM
what rules do you have that are disabled?
Romulo Avila
11-11-2022, 02:32 PM
Good evening,
It is a rule that I create to save an attachment in a given folder, so it has an error and is disabled.
The name of the rule is Save_XML
Aussiebear
11-11-2022, 05:46 PM
May we see your rule?
Romulo Avila
11-12-2022, 11:18 AM
Good afternoon,
It is an "image" rule that executes a script "below"
Sub Project(Item As Outlook.MailItem)
Public Sub Process Attachment(Item As MailItem)
Dim Atmt As Attachment
Dim fileName As String
Dim moveToFolder As Outlook.MAPIFolder
For Each Atmt In Item.Attachments
If Right(Atmt.fileName, 3) = "xml" Or Right(Atmt.fileName, 3) = "XML" Then
fileName = "\\192.168.4.15\c\ATM\ATM_SDOCe\Averbar\11362119" & Atmt.fileName
Atmt.SaveAsFile fileName
Item.UnRead = False
Item.Delete
End If
Next Atmt
End Sub
Romulo Avila
11-28-2022, 01:51 PM
Good afternoon,
I need help in a situation that is occurring, I have a rule that detects that the attachment has the XML extension and saves it in a certain folder, until then it was working normally and after I switched to OFFICE 365, it keeps showing an error and the rule is disabled, how can I resolve this situation.
Thank you very much
** VBA
Public Sub Process Attachment(Item As MailItem)
Dim Atmt As Attachment
Dim fileName As String
Dim moveToFolder As Outlook.MAPIFolder
For Each Atmt In Item.Attachments
If Right(Atmt.fileName, 3) = "xml" Or Right(Atmt.fileName, 3) = "XML" Then
fileName = \\192.168.4.15\c\ATM\ATM_SDOCe\Averbar\11362119 (file://192.168.4.15/c/ATM/ATM_SDOCe/Averbar/11362119) & Atmt.fileName
Atmt.SaveAsFile fileName
Item.UnRead = False
Item.Delete
End If
Next Atmt
End Sub
mancubus
12-20-2022, 03:08 AM
https://learn.microsoft.com/en-us/outlook/troubleshoot/user-interface/attachment-saving-scenarios-do-not-work-as-expected
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.