Consulting

Results 1 to 7 of 7

Thread: Ativação de Regras

  1. #1

    Ativação de Regras

    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
    Last edited by Aussiebear; 11-11-2022 at 01:01 PM. Reason: Converted to English

  2. #2
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    what rules do you have that are disabled?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    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
    Last edited by Aussiebear; 11-11-2022 at 05:46 PM. Reason: Converted to English

  4. #4
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    May we see your rule?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    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
    Attached Images Attached Images
    Last edited by Aussiebear; 11-12-2022 at 01:14 PM. Reason: Convert to English

  6. #6
    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 & Atmt.fileName
          Atmt.SaveAsFile fileName
          Item.UnRead = False
          Item.Delete
       End If
    Next Atmt
    End Sub
    Last edited by Aussiebear; 11-28-2022 at 05:15 PM. Reason: Added code tags to supplied code

  7. #7
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •