Posts by harky

    Samilar to this code but missing status @ Col C
    and it also wont delete empty folder after moved.




    Hi, i really need some help. I had many folder to move [Blocked Image: https://www.mrexcel.com/forum/images/smilies/icon_smile.gif]


    I want to move ALL FILES inside folder A to folder B base on below table


    *No overwrite of file with same filename as whole
    *delete empty folder once folder is moved (on col A)
    *Create folder (on col B)




    [TABLE="border: 1"]

    [tr]


    [td]

    From Folder (Col A)

    [/td]


    [td]

    Move to Folder (Col B)

    [/td]


    [td]

    Status (Col C)

    [/td]


    [/tr]


    [tr]


    [td]

    \\abc\folder1\

    [/td]


    [td]

    \\abc\Main1\

    [/td]


    [td]

    Moved / File existed?

    [/td]


    [/tr]


    [tr]


    [td]

    \\abc\folder2\

    [/td]


    [td]

    \\abc\Main1\

    [/td]


    [td]

    Moved

    [/td]


    [/tr]


    [tr]


    [td]

    \\abc\folder3\

    [/td]


    [td]

    \\abc\Main2\

    [/td]


    [td]

    Moved

    [/td]


    [/tr]


    [tr]


    [td]

    \\abc\folder4\

    [/td]


    [td]

    \\abc\Main2\

    [/td]


    [td]

    Moved

    [/td]


    [/tr]


    [tr]


    [td]

    \\abc\folder5\

    [/td]


    [td]

    \\abc\Main2\

    [/td]


    [td]

    Moved

    [/td]


    [/tr]


    [/TABLE]

    Base on current (below) code.
    Possible to add on more function?


    Possible to move send email to ARCHIVE Folder once email sent on outlook?


    From Inbox 'sent folder' to ARCHIVE


    PST Name: SENT_ARCHIVE
    Subfolder: SendFolder


    Or nt, is there a code where i can put in outlook




    Thanks but i got an error @ Attachments.Add


    But again, i got someone to help and manage to get the script work.




    I'm not sure if this is what you mean. I haven't tested it because I don't have OutLook at the moment


    Code
    1. Sub SendEmail()
    2. Attachments.Add strPath & strFileName

    [TABLE="border: 1"]

    [tr]


    [TD="align: center"]A[/TD]
    [TD="align: center"]B[/TD]
    [TD="align: center"]C[/TD]
    [TD="align: center"]D[/TD]
    [TD="align: center"]E[/TD]
    [TD="align: center"]F[/TD]

    [/tr]


    [tr]


    [TD="align: center"]S/N[/TD]
    [TD="align: center"]To:[/TD]
    [TD="align: center"]cc[/TD]
    [TD="align: center"]Subject[/TD]
    [TD="align: center"]Body[/TD]
    [TD="align: center"]Path of Attachment folder[/TD]

    [/tr]


    [tr]


    [td]

    1

    [/td]


    [td]

    [email protected]

    [/td]


    [td]

    [email protected]

    [/td]


    [td]

    test email 1

    [/td]


    [td]

    Hello Email

    [/td]


    [td]

    C:\Users\ABC\Desktop\SavedFolder\Folder1

    [/td]


    [/tr]


    [/TABLE]
    I had a code below but due i not gd in vba coding, I need some help!
    Possible base on below code to addon email Attachment?


    The following code work for Col A to E but F i dont know?


    Suppose Outlook will attach all files* that found (based on col F Path) and email.
    If no folder found or no files in the folder, it will be ignored and send.


    This work but it cant retain the original colour / highlight.
    Some data is highlighted for special remark. I hope it can retain the riginal colour / highlight. only shift the position.


    Try changing the "CustomSort" code to


    Leave the ArraySort code as it is.

    Hi, I had an error @


    it say: Run-time error '9': subscript out of range


    when i debug, it show highlight on this line.


    pivot = x((inLow + inHi) \ 2)





    Try the attached version of your sample file. Note I added 3 values ("Bad1", "Bad2", "Bad3") in order to test values that were not in the "Custom List"


    Code assigned to button

    Yes. Think there is extra 2.


    Should be like this :) [TABLE="border: 1, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 106"]01019[/TD]
    [TD="width: 117"]2[/TD]
    [TD="width: 117"]6[/TD]
    [TD="width: 117"]89e[/TD]
    [TD="width: 117"]NR6[/TD]
    [TD="width: 117"] [/TD]
    [TD="width: 117"] [/TD]
    [TD="width: 117"] [/TD]
    [TD="width: 117"] [/TD]

    [/tr]


    [/TABLE]