Author Topic: Microsoft Outlook  (Read 8901 times)

shankle

  • Member
  • ****
  • Posts: 868
Re: Microsoft Outlook
« Reply #15 on: September 11, 2013, 03:25:07 AM »
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

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: Microsoft Outlook
« Reply #16 on: September 11, 2013, 03:51:02 AM »
Jack,
you can re-direct output of console-mode programs to a file by using the ">" character

Code: [Select]
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

  • Member
  • *****
  • Posts: 13303
  • Assembly is fun ;-)
    • MasmBasic
Re: Microsoft Outlook
« Reply #17 on: September 11, 2013, 03:55:56 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.

Quote
Just 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