Posts by daniel.c

    Re: Export Email Text Into Worksheet


    Give a try at the below macro. I begin parsing messages counting from row 2 on "Sheet1" sheet, letting place for headings on row 1. Also, if there are two consecutive commas, there will be an empty cell in the corresponding column.

    Re: Copy And Paste A String Of Numbers/text Automatically In word


    Well, OK, I'm quite new with Word programmation. Strangely, the tab marks are considered as numerals. I modified the macro in accordance. I have not tested other special characters, so you may have other misbehaviours. Here is the macro "ExtractEveryWhere". If you need the same modification in an other macro, please, tell me.

    Re: Copy And Paste A String Of Numbers/text Automatically In word


    Quote


    Just wondering if I did use the previous code - is there a way to make it compatible for lower MS Office version?


    I don't think it's possible.
    I am quite sorry not to have tested the code I gave you. If you use the second method (that of the "test" macro), you need to replace :

    Code
    Set DocSource = Documents.Open(myFile)


    with

    Code
    Set DocSource = ActiveDocument

    Re: Copy And Paste A String Of Numbers/text Automatically In word


    I did a search on the internet and can't find such a case. I tested it with Word 2007, so I can't see any difference. Look at Tools / References in VBE window.
    I have the following references checked :
    - Visual Basic for Applications
    - Microsoft Word 12.0 Object Library
    - OLE Automation
    - Normal
    - Microsoft Word 12.0 Object Library
    Do you have the same (Normal may refer to the macros of the "Normal" template) ?


    Please, try the following macro :

    Code
    Sub test()
        With Application.Dialogs(wdDialogFileOpen)
            .Name = "*.doc*"
            .Show
        End With
        myFile = ActiveDocument.Name
    End Sub


    I you have no error, replace in the macros :


    Code
    With Application.FileDialog(msoFileDialogOpen)
            .Show
            .Filters.Add "Word docs", "*.doc*"
            myFile = .SelectedItems(1)
        End With
        Set DocSource = Documents.Open(myFile)
        myFile = ActiveDocument.Name


    with


    Code
    With Application.Dialogs(wdDialogFileOpen)
            .Name = "*.doc*"
            .Show
        End With
        myFile = ActiveDocument.Name

    Re: Copy And Paste A String Of Numbers/text Automatically In word


    Here are the macros. Both allows you to choose your input file. The first macro is the same as the preceding one (I remove the duplicate problem) :


    The next one picks up each 6 digits sequence whatever its position :

    Re: Copy And Paste A String Of Numbers/text Automatically In word


    No need to be sorry, the message is misleading ;)
    The macro below should do the trick. It is even possible to extract each numeric string wherever it is (no need to begin at the same place).

    Re: Insert Row On Colour Change And Add Descriptions


    Customer info is on Sheet2 ans product info on Sheet3 :

    Re: Insert Row On Colour Change And Add Descriptions


    Try the following macro. I used 33 for blue colorindex and 6 for yellow colorindex. You'll have to change that to suit your needs.

    Re: Copy And Paste A String Of Numbers/text Automatically In word


    The following macro opens the source document and copies the numbers into a new file. I suppose the numbers are the first characters of a paragraph. Let me know if this is not exact.

    Re: Copy From File To File With Out Of Order Data


    The following macro supposes that the two files are opened. The macro should be placed in one of the two files, or in a third one. It may be attached to a button :

    Re: Send Email To Receivers Range


    I understood why my macro bugged. In fact I executed it step by step, and apparently, I am not allowed to. The following has been tested. You'll have to make changes to select the message you want to be forwarded. In the present macro it's line :

    Code
    If OldMail.Subject <> "test" Then Exit Sub


    Here are the macro and function :

    Re: Send Email To Receivers Range


    I suppose you mean "Outlook", not "Outlook Express" ?[hr]*[/hr] Auto Merged Post Until 24 Hrs Passes;[dl]*[/dl]I'm wondering if you changed the row :

    Code
    If OldMail.Subject <> "test" Then Exit Sub


    I used it to discard all messages which don't have "test" as subject.
    To be quite sure you have the same problem as me, replace all code by :


    This macro should display the subject of every incoming mail.

    Re: Send Email To Receivers Range


    I am sorry to propose the following macro. The first part triggering the macro when a message is received (and subject equal to "test") worked for a time, then it bugged. The macro fired OK, but can't extract the mail. The second part worked (extracting users from the closed workbook). The extraction is done for each message. An alternative would be to do the job at Outlook start, if there are no changes in the recipients list (by the way, I took only recipients from sheet "review"). I can't test the last part, because of the bug in the first part. Be aware that the macro displays no error thanks to :

    Code
    On Error Resume Next


    Anyway, here is the code :


    The code has to be pasted in the ThisOutlookSession module. Try it anyway,because I don't if there's not somthing broken in my Outlook. Replace "c:\temp with the path of the FATcheck.wls workbook.

    Re: Send Email To Receivers Range


    That's a lot of new stuff. Concerning the message, I think it's only when you send messages from Excel. For what you explain, the macro must be an Outlook macro. However, I don't know if it's possible to deal with duplicates from a closed workbook. I work on it as soon I will be back.