News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Microsoft Outlook

Started by shankle, September 09, 2013, 12:41:11 AM

Previous topic - Next topic

shankle

Thanks again JJ. It worked just fine with 1 exception.
The result goes to what looks like a Dos Screen.
Black with white letters. I can print it with "Faststone" capture.

Just curious, what language is your code in??
You don't have to answer if you don't wish to.

dedndave

Jack,
you can re-direct output of console-mode programs to a file by using the ">" character

C:\> ProgName >MyFile.csv

that one creates a new file, or over-writes an existing one, named MyFile.csv
using 2 ">>" appends the output to an existing file

be aware that, if the program has a "press any key to exit" message, you won't see it   :biggrin:
so, you just have to know to press a key when it "should" be done

jj2007

Quote from: shankle on September 11, 2013, 03:25:07 AM
The result goes to what looks like a Dos Screen

Yes indeed. You can run it from a DOS prompt and write results to a file with >myfile.txt etc, as Dave wrote above.

QuoteJust curious, what language is your code in??

Pure Masm ;-)

Here is a version that copies the strings to the clipboard, so that you can print it from MS Word or similar:

include \masm32\MasmBasic\MasmBasic.inc        ; download
  Init
  Let esi=CL$()        ; pass your file via the commandline
  .if !Instr_(esi, ".csv", 1)
        Let esi="wlmcontacts.csv"        ; or use a default
  .endif
  Let edi="Records found in "+esi
  Recall esi, Ad$(), csv        ; read the file into a two-dimensional string array
  For_ ecx=0 To eax-1        ; eax=#lines
          Let edi=edi+CrLf$+Ad$(ecx, 3)+", "
          Let edi=edi+Ad$(ecx, 1)
        xor ebx, ebx
        ; there could be several email addresses, so let's try all columns:
        .Repeat
                .if Instr_(Ad$(ecx, ebx), "@")        ; email?
                          Let edi=edi+", "+Ad$(ecx, ebx)
                .endif
                inc ebx
        .Until ebx>99
  Next
  MsgBox 0, edi, "Copy to clipboard?", MB_YESNO
  .if eax==IDYES
        SetClip$ edi
  .endif
  Exit
end start