home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2004 April / DPPCPRO0404.ISO / April / CAS / disk2 / data.2 / MACROS / AMIPRO / jjloglet.smm < prev    next >
Encoding:
INI File  |  1995-04-04  |  19.6 KB  |  1,697 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     
  13. [port]
  14.     LPT2:
  15. [lang]
  16.     1
  17. [fldnames]
  18.     Field1
  19.     Field2
  20.     Field3
  21.     Field4
  22.     Field5
  23.     Field6
  24.     Field7
  25.     Field8
  26. [desc]
  27.     Logs the current document as an item in the Commence letter log category
  28.     
  29.     
  30.     
  31.     
  32.     797048002
  33.     19
  34.     706654425
  35.     153
  36.     8
  37.     0
  38.     0
  39.     0
  40.     0
  41.     
  42.     
  43.     
  44.     
  45.     
  46.     
  47.     0
  48. [fopts]
  49.     0
  50.     1
  51.     0
  52.     0
  53.     
  54.     
  55. [lnopts]
  56.     2
  57.     Body Text
  58.     1
  59. [docopts]
  60.     5
  61.     2
  62. [GramStyle]
  63.     
  64. [tag]
  65.     Body Text
  66.     2
  67.     [fnt]
  68.         TimesNewRomanPS
  69.         240
  70.         0
  71.         49152
  72.     [algn]
  73.         1
  74.         1
  75.         0
  76.         0
  77.         0
  78.     [spc]
  79.         33
  80.         273
  81.         1
  82.         0
  83.         0
  84.         1
  85.         100
  86.     [brk]
  87.         4
  88.     [line]
  89.         8
  90.         0
  91.         1
  92.         0
  93.         1
  94.         1
  95.         1
  96.         10
  97.         10
  98.         1
  99.     [spec]
  100.         0
  101.         0
  102.         
  103.         0
  104.         1
  105.         1
  106.         0
  107.         0
  108.         0
  109.         0
  110.     [nfmt]
  111.         280
  112.         1
  113.         2
  114.         .
  115.         ,
  116.         $
  117.     Body Text
  118.     0
  119.     0
  120. [tag]
  121.     Body Single
  122.     3
  123.     [fnt]
  124.         TimesNewRomanPS
  125.         240
  126.         0
  127.         49152
  128.     [algn]
  129.         1
  130.         1
  131.         0
  132.         0
  133.         0
  134.     [spc]
  135.         33
  136.         273
  137.         1
  138.         0
  139.         0
  140.         1
  141.         100
  142.     [brk]
  143.         4
  144.     [line]
  145.         8
  146.         0
  147.         1
  148.         0
  149.         1
  150.         1
  151.         1
  152.         10
  153.         10
  154.         1
  155.     [spec]
  156.         0
  157.         0
  158.         
  159.         0
  160.         1
  161.         1
  162.         0
  163.         0
  164.         0
  165.         0
  166.     [nfmt]
  167.         280
  168.         1
  169.         2
  170.         .
  171.         ,
  172.         $
  173.     Body Single
  174.     0
  175.     0
  176. [tag]
  177.     Bullet
  178.     4
  179.     [fnt]
  180.         TimesNewRomanPS
  181.         240
  182.         0
  183.         49152
  184.     [algn]
  185.         1
  186.         1
  187.         0
  188.         288
  189.         288
  190.     [spc]
  191.         33
  192.         273
  193.         1
  194.         0
  195.         0
  196.         1
  197.         100
  198.     [brk]
  199.         4
  200.     [line]
  201.         8
  202.         0
  203.         1
  204.         0
  205.         1
  206.         1
  207.         1
  208.         10
  209.         10
  210.         1
  211.     [spec]
  212.         0
  213.         0
  214.         <*0>
  215.         360
  216.         1
  217.         1
  218.         0
  219.         0
  220.         0
  221.         0
  222.     [nfmt]
  223.         272
  224.         1
  225.         2
  226.         .
  227.         ,
  228.         $
  229.     Bullet
  230.     0
  231.     0
  232. [tag]
  233.     Bullet 1
  234.     5
  235.     [fnt]
  236.         TimesNewRomanPS
  237.         240
  238.         0
  239.         49152
  240.     [algn]
  241.         1
  242.         1
  243.         288
  244.         288
  245.         288
  246.     [spc]
  247.         33
  248.         273
  249.         1
  250.         0
  251.         0
  252.         1
  253.         100
  254.     [brk]
  255.         4
  256.     [line]
  257.         8
  258.         0
  259.         1
  260.         0
  261.         1
  262.         1
  263.         1
  264.         10
  265.         10
  266.         1
  267.     [spec]
  268.         0
  269.         0
  270.         <*5>
  271.         0
  272.         1
  273.         1
  274.         0
  275.         0
  276.         0
  277.         0
  278.     [nfmt]
  279.         280
  280.         1
  281.         2
  282.         .
  283.         ,
  284.         $
  285.     Bullet 1
  286.     0
  287.     0
  288. [tag]
  289.     Number List
  290.     6
  291.     [fnt]
  292.         TimesNewRomanPS
  293.         240
  294.         0
  295.         49152
  296.     [algn]
  297.         1
  298.         1
  299.         360
  300.         360
  301.         360
  302.     [spc]
  303.         33
  304.         273
  305.         1
  306.         0
  307.         0
  308.         1
  309.         100
  310.     [brk]
  311.         4
  312.     [line]
  313.         8
  314.         0
  315.         1
  316.         0
  317.         1
  318.         1
  319.         1
  320.         10
  321.         10
  322.         1
  323.     [spec]
  324.         0
  325.         0
  326.         <*:>.
  327.         360
  328.         1
  329.         1
  330.         0
  331.         0
  332.         0
  333.         0
  334.     [nfmt]
  335.         272
  336.         1
  337.         2
  338.         .
  339.         ,
  340.         $
  341.     Number List
  342.     0
  343.     0
  344. [tag]
  345.     Subhead
  346.     7
  347.     [fnt]
  348.         TimesNewRomanPS
  349.         240
  350.         0
  351.         49155
  352.     [algn]
  353.         1
  354.         1
  355.         0
  356.         0
  357.         0
  358.     [spc]
  359.         33
  360.         273
  361.         1
  362.         72
  363.         72
  364.         1
  365.         100
  366.     [brk]
  367.         4
  368.     [line]
  369.         8
  370.         0
  371.         1
  372.         0
  373.         1
  374.         1
  375.         1
  376.         10
  377.         10
  378.         1
  379.     [spec]
  380.         0
  381.         2
  382.         
  383.         0
  384.         1
  385.         1
  386.         0
  387.         0
  388.         0
  389.         0
  390.     [nfmt]
  391.         272
  392.         1
  393.         2
  394.         .
  395.         ,
  396.         $
  397.     Subhead
  398.     0
  399.     0
  400. [tag]
  401.     Title
  402.     8
  403.     [fnt]
  404.         Arial MT
  405.         360
  406.         0
  407.         16385
  408.     [algn]
  409.         4
  410.         1
  411.         0
  412.         0
  413.         0
  414.     [spc]
  415.         33
  416.         446
  417.         1
  418.         144
  419.         72
  420.         1
  421.         100
  422.     [brk]
  423.         16
  424.     [line]
  425.         8
  426.         0
  427.         1
  428.         0
  429.         1
  430.         1
  431.         1
  432.         10
  433.         10
  434.         1
  435.     [spec]
  436.         0
  437.         1
  438.         
  439.         0
  440.         1
  441.         1
  442.         0
  443.         0
  444.         0
  445.         0
  446.     [nfmt]
  447.         272
  448.         1
  449.         2
  450.         .
  451.         ,
  452.         $
  453.     Title
  454.     0
  455.     0
  456. [lay]
  457.     Standard
  458.     513
  459.     [rght]
  460.         15840
  461.         12240
  462.         1
  463.         1440
  464.         1440
  465.         1
  466.         1440
  467.         1440
  468.         0
  469.         1
  470.         0
  471.         1
  472.         0
  473.         2
  474.         1
  475.         1440
  476.         10800
  477.         12
  478.         1
  479.         720
  480.         1
  481.         1440
  482.         1
  483.         2160
  484.         1
  485.         2880
  486.         1
  487.         3600
  488.         1
  489.         4320
  490.         1
  491.         5040
  492.         1
  493.         5760
  494.         1
  495.         6480
  496.         1
  497.         7200
  498.         1
  499.         7920
  500.         1
  501.         8640
  502.     [hrght]
  503.     [lyfrm]
  504.         1
  505.         11200
  506.         0
  507.         0
  508.         12240
  509.         1440
  510.         0
  511.         1
  512.         3
  513.         1 0 0 0 0 0 0
  514.         0
  515.         0
  516.         1
  517.     [frmlay]
  518.         1440
  519.         12240
  520.         1
  521.         1440
  522.         72
  523.         1
  524.         792
  525.         1440
  526.         0
  527.         1
  528.         0
  529.         1
  530.         1
  531.         0
  532.         1
  533.         1440
  534.         10800
  535.         1
  536.         3
  537.         9360
  538.     [txt]
  539. >
  540.     [frght]
  541.     [lyfrm]
  542.         1
  543.         13248
  544.         0
  545.         14400
  546.         12240
  547.         15840
  548.         0
  549.         1
  550.         3
  551.         1 0 0 0 0 0 0
  552.         0
  553.         0
  554.         2
  555.     [frmlay]
  556.         15840
  557.         12240
  558.         1
  559.         1440
  560.         792
  561.         1
  562.         14472
  563.         1440
  564.         0
  565.         1
  566.         0
  567.         1
  568.         1
  569.         0
  570.         1
  571.         1440
  572.         10800
  573.         2
  574.         2
  575.         4680
  576.         3
  577.         9360
  578.     [txt]
  579.  
  580. >
  581. [elay]
  582. [l1]
  583.     0
  584. [pg]
  585.     8
  586.     45 0 12 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  587.     90 0 15 0 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  588.     135 0 13 0 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  589.     180 0 0 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  590.     225 0 64 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  591.     270 0 6 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  592.     315 0 10 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  593.     319 0 0 1025 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  594. [edoc]
  595. <:#284,9360>Function JJdoclog()
  596.  
  597. <:#284,9360>'Copyright 1992-95 Jensen-Jones Inc.
  598.  
  599. <:#284,9360>'Commence Document Log Macro
  600.  
  601. <:#284,9360>'Creates a Letter Log item for the current document
  602.  
  603. <:#284,9360>
  604.  
  605. <:#284,9360>DEFSTR AppName, gMsg1, gMsg2, gMsg4, gCancelJob
  606.  
  607. <:#284,9360>DEFSTR gFax1, gFax2
  608.  
  609. <:#284,9360>DEFSTR gNone, gMsg7, gMsg8, gMsg9
  610.  
  611. <:#284,9360>DEFSTR gRefersToPerson, gRefersToCompany, gPerson, gCompany
  612.  
  613. <:#284,9360>DEFSTR MacroTitle, gLogItemName, gNotes, gRefersPText, gRefersCText
  614.  
  615. <:#284,9360>DEFSTR gCopyright, gShowCompany, gShowPeople, gOK, gCancel
  616.  
  617. <:#284,9360>
  618.  
  619. <:#284,9360>AppName = "Commence"
  620.  
  621. <:#284,9360>
  622.  
  623. <:#284,9360>' Literal text; START TRANSLATION
  624.  
  625. <:#284,9360>' DON'T FORGET DIALOG BOXES BELOW.
  626.  
  627. <:#284,9360>
  628.  
  629. <:#284,9360>gMsg1 = "Could NOT Establish DDE with {AppName}; Exiting ..."
  630.  
  631. <:#284,9360>gMsg2 = "Could NOT launch {AppName}; Exiting .."
  632.  
  633. <:#284,9360>
  634.  
  635. <:#284,9360>gMsg7 = "DDE message failure, exiting Macro"
  636.  
  637. <:#284,9360>gMsg8 = "You must enter a name for the log item"
  638.  
  639. <:#284,9360>gMsg9 = "You must save this file with a filename before you can log it"
  640.  
  641. <:#284,9360>gNone = "None"
  642.  
  643. <:#284,9360>
  644.  
  645. <:#284,9360>gRefersToPerson = ",Refers to,Person,"
  646.  
  647. <:#284,9360>gRefersToCompany = ",Refers to,Company,"
  648.  
  649. <:#284,9360>
  650.  
  651. <:#284,9360>gPerson = "Person"
  652.  
  653. <:#284,9360>gCompany = "Company"
  654.  
  655. <:#284,9360>
  656.  
  657. <:#284,9360>MacroTitle = "Commence Letter Log/Fax Macro"
  658.  
  659. <:#284,9360>gLogItemName = "Log item name:"
  660.  
  661. <:#284,9360>gNotes = "Notes:"
  662.  
  663. <:#284,9360>gRefersPText = "Refers to Person:"
  664.  
  665. <:#284,9360>gRefersCText = "Refers to Company:"
  666.  
  667. <:#284,9360>gCopyright = "Copyright @ 1993-94 Jensen-Jones, Inc."
  668.  
  669. <:#284,9360>gShowCompany = "Show Companies"
  670.  
  671. <:#284,9360>gShowPeople = "Show People"
  672.  
  673. <:#284,9360>gOK = "OK"
  674.  
  675. <:#284,9360>gCancel = "Cancel"
  676.  
  677. <:#284,9360>
  678.  
  679. <:#284,9360>' END OF TRANSLATION
  680.  
  681. <:#284,9360>
  682.  
  683. <:#284,9360>b = Chr$(91)
  684.  
  685. <:#284,9360>'SingleStep(1)
  686.  
  687. <:#284,9360>OnError  Normalx        'If we get an error, just cancel the macro
  688.  
  689. <:#284,9360>
  690.  
  691. <:#284,9360>LetterName = GetDocInfo$(1)
  692.  
  693. <:#284,9360>LetterPath = GetDocInfo$(2)
  694.  
  695. <:#284,9360>LetterFile = strcat$(LetterPath, "\", LetterName)
  696.  
  697. <:#284,9360>IF LetterFile = "\(Untitled)" THEN
  698.  
  699. <:#284,9360>    Message (gMsg9)
  700.  
  701. <:#284,9360>    EXIT FUNCTION
  702.  
  703. <:#284,9360>ENDIF
  704.  
  705. <:#284,9360>
  706.  
  707. <:#284,9360>'Set up the default values
  708.  
  709. <:#284,9360>NameSize = 35
  710.  
  711. <:#284,9360>Dscrpt = ""
  712.  
  713. <:#284,9360>Name = LetterName
  714.  
  715. <:#284,9360>
  716.  
  717. <:#284,9360>'This variable must be changed to 0 for versions <<2.0b of AmiPro
  718.  
  719. <:#284,9360>DDEExecErr = -1
  720.  
  721. <:#284,9360>
  722.  
  723. <:#284,9360>Dim Fld(1000)
  724.  
  725. <:#284,9360>
  726.  
  727. <:#284,9360>c = DDEInitiate("{AppName}", "GetData")
  728.  
  729. <:#284,9360>If c<<=0
  730.  
  731. <:#284,9360>        ' Do Error Check
  732.  
  733. <:#284,9360>        id = c
  734.  
  735. <:#284,9360>        OK = Exec("{AppName}.EXE", "", 1)  ' Open it
  736.  
  737. <:#284,9360>        IF OK <;> 32
  738.  
  739. <:#284,9360>        id = DDEInitiate("{AppName}", "GetData")  ' Call Application again
  740.  
  741. <:#284,9360>            IF id =0  ' Still not open, End macro
  742.  
  743. <:#284,9360>                BEEP()
  744.  
  745. <:#284,9360>                DDETerminate(id)  ' Close the DDE Channel
  746.  
  747. <:#284,9360>                HourGlass(0)
  748.  
  749. <:#284,9360>                IgnoreKeyboard(0)
  750.  
  751. <:#284,9360>                BEEP()
  752.  
  753. <:#284,9360>                Message(gMsg1)
  754.  
  755. <:#284,9360>                StatusBarMsg("")
  756.  
  757. <:#284,9360>                HourGlass(0)
  758.  
  759. <:#284,9360>                EXIT FUNCTION
  760.  
  761. <:#284,9360>            ENDIF
  762.  
  763. <:#284,9360>        ELSE
  764.  
  765. <:#284,9360>            IF id <;> 0
  766.  
  767. <:#284,9360>                DDETerminate(id)  ' Close the DDE Channel
  768.  
  769. <:#284,9360>            endif
  770.  
  771. <:#284,9360>            IgnoreKeyboard(0)
  772.  
  773. <:#284,9360>            HourGlass(0)
  774.  
  775.             BEEP()
  776.  
  777.             Message(gMsg2)
  778.  
  779.             StatusBarMsg("")
  780.  
  781.             EXIT FUNCTION
  782.  
  783.         ENDIF
  784.  
  785.     Endif  ' End of Error Check
  786.  
  787. GetPersonNames:
  788.  
  789. Hourglass(1)
  790.  
  791. conn = 1
  792.  
  793.  
  794. 'Get the list of Person Names
  795.  
  796. catlist = DDEReceive$(c, "{b}GetItemNames(Person,|)]")
  797.  
  798. 'Set the first item to None
  799.  
  800. Fld(1) = gNone
  801.  
  802. 'Only get the first 1000 names
  803.  
  804. FOR I = 2 To 1000
  805.  
  806.     J = InStr(1,catlist, "|")
  807.  
  808.     IF J <<<;> 0 THEN
  809.  
  810.         Fld(I) = Left$(catlist, J - 1)
  811.  
  812.         catlist = Mid$(catlist, J + 1, Len(catlist) - J)
  813.  
  814.     ELSE
  815.  
  816.         Fld(I) = catlist
  817.  
  818.         itemcount = I
  819.  
  820.         Goto Break0
  821.  
  822.     ENDIF
  823.  
  824.  
  825. NEXT
  826.  
  827. itemcount = I
  828.  
  829. Break0:
  830.  
  831.  
  832. Ask1:
  833.  
  834. FOR I = 1 to itemcount
  835.  
  836.     FillList(Fld(I))
  837.  
  838. NEXT
  839.  
  840.  
  841.  
  842. FillEdit(8002, Name)
  843.  
  844. FillEdit(8001, Dscrpt)
  845.  
  846. FillEdit(1003, gCopyright)
  847.  
  848.  
  849. 'SingleStep(1)
  850.  
  851. Hourglass(0)
  852.  
  853. dlgbox = DialogBox(".", "logdlg1")
  854.  
  855. IF dlgbox = 0 THEN        
  856.  
  857.     Goto Normalx
  858.  
  859. ELSEIF dlgbox = 1 THEN
  860.  
  861.     Goto LogLetter
  862.  
  863. ELSEIF dlgbox = 3 THEN
  864.  
  865.     'First save the current data
  866.  
  867.     Dscrpt = GetDialogField$(8001)
  868.  
  869.     Name = GetDialogField$(8002)
  870.  
  871.     Goto GetCompanyNames
  872.  
  873. ENDIF
  874.  
  875.  
  876.  
  877. GetCompanyNames:
  878.  
  879. Hourglass(1)
  880.  
  881. conn = 2
  882.  
  883.  
  884. 'Get the list of Company Names
  885.  
  886. catlist = DDEReceive$(c, "{b}GetItemNames(Company,|)]")
  887.  
  888. 'Set the first item to None
  889.  
  890. Fld(1) = gNone
  891.  
  892. 'Only get up to the first 1000 names
  893.  
  894. FOR I = 2 To 1000
  895.  
  896.     J = InStr(1,catlist, "|")
  897.  
  898.     IF J <<<;> 0 THEN
  899.  
  900.         Fld(I) = Left$(catlist, J - 1)
  901.  
  902.         catlist = Mid$(catlist, J + 1, Len(catlist) - J)    
  903.  
  904.     ELSE
  905.  
  906.         Fld(I) = catlist        
  907.  
  908.         itemcount = I
  909.  
  910.         Goto Break1    'Break out when we run out of items
  911.  
  912.     ENDIF
  913.  
  914. NEXT
  915.  
  916. itemcount = I
  917.  
  918. Break1:
  919.  
  920.  
  921. Ask2:
  922.  
  923. FOR I = 1 to itemcount
  924.  
  925.     FillList(Fld(I))
  926.  
  927. NEXT
  928.  
  929.  
  930. FillEdit(8002, Name)
  931.  
  932. FillEdit(8001, Dscrpt)
  933.  
  934. FillEdit(1003, gCopyright)
  935.  
  936.  
  937. Hourglass(0)
  938.  
  939. <:#284,9360>dlgbox = DialogBox(".", "logdlg2")
  940.  
  941. <:#284,9360>
  942.  
  943. <:#284,9360>IF dlgbox = 0 THEN        
  944.  
  945. <:#284,9360>    Goto Normalx
  946.  
  947. <:#284,9360>ELSEIF dlgbox = 1 THEN
  948.  
  949. <:#284,9360>    Goto LogLetter
  950.  
  951. <:#284,9360>ELSEIF dlgbox = 3 THEN
  952.  
  953. <:#284,9360>
  954.  
  955. <:#284,9360>    'First save the current data
  956.  
  957. <:#284,9360>    Dscrpt = GetDialogField$(8001)
  958.  
  959. <:#284,9360>    Name = GetDialogField$(8002)
  960.  
  961. <:#284,9360>    Goto GetPersonNames
  962.  
  963. <:#284,9360>ENDIF
  964.  
  965. <:#284,9360>
  966.  
  967. <:#284,9360>LogLetter:
  968.  
  969. <:#284,9360>Hourglass(1)
  970.  
  971. <:#284,9360>Citem = GetDialogField$(9000)
  972.  
  973. <:#284,9360>Name = GetDialogField$(8002)
  974.  
  975. <:#284,9360>IF Len(Name) <;> NameSize THEN
  976.  
  977. <:#284,9360>    Name = Left$(Name, NameSize)
  978.  
  979. <:#284,9360>ENDIF
  980.  
  981. <:#284,9360>Dscrpt = GetDialogField$(8001)
  982.  
  983. <:#284,9360>'Amipro seems to have trouble with long DDEExecute strings, so limit this size
  984.  
  985. <:#284,9360>LP = Len(Dscrpt)
  986.  
  987. <:#284,9360>IF Len(Dscrpt) <;> 190 THEN
  988.  
  989. <:#284,9360>    Dscrpt = Left$(Dscrpt, 190)
  990.  
  991. <:#284,9360>ENDIF
  992.  
  993. <:#284,9360>
  994.  
  995. <:#284,9360>'Validate the data
  996.  
  997. <:#284,9360>IF Name = "" THEN
  998.  
  999. <:#284,9360>    Message(gMsg8)
  1000.  
  1001. <:#284,9360>    IF conn = 1 THEN
  1002.  
  1003. <:#284,9360>        Goto Ask1
  1004.  
  1005. <:#284,9360>    ELSEIF conn = 2
  1006.  
  1007. <:#284,9360>        Goto Ask2
  1008.  
  1009. <:#284,9360>    ENDIF
  1010.  
  1011. <:#284,9360>ENDIF
  1012.  
  1013. <:#284,9360>q$ = Chr$(34)
  1014.  
  1015. <:#284,9360>'Create the log item
  1016.  
  1017. <:#284,9360>Req = strcat$("{b}AddItem(Letter Log,",q$,Name,q$,")]")
  1018.  
  1019. <:#284,9360>ret = DDEExecute(c, Req)
  1020.  
  1021. <:#284,9360>IF ret = ddeexecerr Then
  1022.  
  1023. <:#284,9360>    Message(gMsg7)
  1024.  
  1025. <:#284,9360>    Goto Done
  1026.  
  1027. <:#284,9360>ENDIF
  1028.  
  1029. <:#284,9360>'Add the other data to the item
  1030.  
  1031. <:#284,9360>Req = strcat$("{b}EditItem(Letter Log,",q$,Name,q$,",Notes,",q$)
  1032.  
  1033. Req = strcat$(Req,Dscrpt,q$,")]")
  1034.  
  1035. ret = DDEExecute(c, Req)
  1036.  
  1037. IF ret = ddeexecerr Then
  1038.  
  1039.     Message(gMsg7)
  1040.  
  1041.     Goto Done
  1042.  
  1043. ENDIF
  1044.  
  1045.  
  1046. Req = strcat$("{b}EditItem(Letter Log,",q$,Name,q$,",Date Sent,Today)]")
  1047.  
  1048. ret = DDEExecute(c, Req)
  1049.  
  1050. IF ret = ddeexecerr Then
  1051.  
  1052.     Message(gMsg7)
  1053.  
  1054.     Goto Done
  1055.  
  1056. ENDIF
  1057.  
  1058.  
  1059. Req = strcat$("{b}EditItem(Letter Log,",q$,Name,q$,",Reference File,")
  1060.  
  1061. Req = strcat$(Req,q$,LetterFile,q$")]")
  1062.  
  1063. ret = DDEExecute(c, Req)
  1064.  
  1065. IF ret = ddeexecerr Then
  1066.  
  1067.     Message(gMsg7)
  1068.  
  1069.     Goto Done
  1070.  
  1071. ENDIF
  1072.  
  1073.  
  1074.  
  1075. 'Assign the connection if the item is not "None"
  1076.  
  1077.  
  1078. IF Citem <<<;> gNone THEN
  1079.  
  1080.  
  1081.  IF conn = 1 THEN        'Connect to Person category
  1082.  
  1083.  
  1084.   Req = strcat$("{b}AssignConnection(Letter Log,",q$,Name,q$)
  1085.  
  1086.   Req = strcat$(Req,gRefersToPerson,q$,Citem,q$,")]")
  1087.  
  1088.  
  1089.  ELSEIF conn = 2 THEN    'Connect to Company category
  1090.  
  1091.  
  1092.   Req = strcat$("{b}AssignConnection(Letter Log,",q$,Name,q$)
  1093.  
  1094.   Req = strcat$(Req,gRefersToCompany,q$,Citem,q$,")]")
  1095.  
  1096.  
  1097.  ENDIF 
  1098.  
  1099.  
  1100.  
  1101.   ret = DDEExecute(c, Req)
  1102.  
  1103.  
  1104.  IF ret = ddeexecerr Then
  1105.  
  1106.     Message(gMsg7)
  1107.  
  1108.     Goto Done
  1109.  
  1110.  ENDIF
  1111.  
  1112.  
  1113. ENDIF
  1114.  
  1115.  
  1116.  
  1117. Goto Normalx
  1118.  
  1119.  
  1120. Done:    ' Placeholder for further error notification
  1121.  
  1122.  
  1123. Normalx:
  1124.  
  1125.  
  1126. DDETerminate(c)
  1127.  
  1128.  
  1129. Hourglass(0)
  1130.  
  1131.  
  1132. END FUNCTION
  1133.  
  1134.  
  1135. ' TRANSLATE THESE DIALOGS.
  1136.  
  1137.  
  1138. DIALOG logdlg1
  1139.  
  1140. -2134900736 10 90 36 196 194 "" "" "Commence Letter Log Macro"
  1141.  
  1142. 8 20 108 12 8002 1350631552 "edit" "" 0 
  1143.  
  1144. 9 8 86 10 1001 1342177280 "static" "Log item name:" 0 
  1145.  
  1146. 9 50 174 13 8001 1350631552 "edit" "" 0 
  1147.  
  1148. 9 38 40 10 1009 1342177280 "static" "Notes:" 0 
  1149.  
  1150. 9 71 70 10 1002 1342177280 "static" "Refers to Person:" 0 
  1151.  
  1152. 9 84 173 62 9000 1352728577 "listbox" "" 0 
  1153.  
  1154. 21 177 145 9 1003 1342177281 "static" "" 0 
  1155.  
  1156. 63 154 59 14 3 1342242816 "button" "Get Companies" 0 
  1157.  
  1158. 143 9 40 14 1 1342242816 "button" "OK" 0 
  1159.  
  1160. 143 28 40 14 2 1342242816 "button" "Cancel" 0 
  1161.  
  1162. END DIALOG
  1163.  
  1164.  
  1165. DIALOG logdlg2
  1166.  
  1167. -2134900736 10 89 36 196 190 "" "" "Commence Letter Log Macro"
  1168.  
  1169. 8 20 108 12 8002 1350631552 "edit" "" 0 
  1170.  
  1171. 9 8 86 10 1001 1342177280 "static" "Log item name:" 0 
  1172.  
  1173. 9 50 174 13 8001 1350631552 "edit" "" 0 
  1174.  
  1175. 9 38 40 10 1009 1342177280 "static" "Notes:" 0 
  1176.  
  1177. 9 69 70 10 1002 1342177280 "static" "Refers to Company:" 0 
  1178.  
  1179. 9 81 173 65 9000 1352728577 "listbox" "" 0 
  1180.  
  1181. 21 174 145 9 1003 1342177281 "static" "" 0 
  1182.  
  1183. 63 154 59 14 3 1342242816 "button" "Get People" 0 
  1184.  
  1185. 143 9 40 14 1 1342242816 "button" "OK" 0 
  1186.  
  1187. 143 28 40 14 2 1342242816 "button" "Cancel" 0 
  1188.  
  1189. END DIALOG
  1190.  
  1191.  
  1192. ' END OF TRANSLATION.
  1193.  
  1194.  
  1195.  
  1196. >
  1197.  
  1198. [Embedded]
  1199. 00014180
  1200. >
  1201. [macsum] 3
  1202. JJdoclog 0 0 49 0
  1203. logdlg1 4688 0 -1 288
  1204. logdlg2 5254 0 -1 302
  1205. [macse]
  1206. 14 JJdoclog
  1207. 7 "Commence"
  1208. 8 1
  1209. 7 "Could NOT Establish DDE with {1}; Exiting ..."
  1210. 8 2
  1211. 7 "Could NOT launch {1}; Exiting .."
  1212. 8 3
  1213. 7 "DDE message failure, exiting Macro"
  1214. 8 9
  1215. 7 "You must enter a name for the log item"
  1216. 8 10
  1217. 7 "You must save this file with a filename before you can log it"
  1218. 8 11
  1219. 7 "None"
  1220. 8 8
  1221. 7 ",Refers to,Person,"
  1222. 8 12
  1223. 7 ",Refers to,Company,"
  1224. 8 13
  1225. 7 "Person"
  1226. 8 14
  1227. 7 "Company"
  1228. 8 15
  1229. 7 "Commence Letter Log/Fax Macro"
  1230. 8 16
  1231. 7 "Log item name:"
  1232. 8 17
  1233. 7 "Notes:"
  1234. 8 18
  1235. 7 "Refers to Person:"
  1236. 8 19
  1237. 7 "Refers to Company:"
  1238. 8 20
  1239. 7 "Copyright @ 1993-94 Jensen-Jones, Inc."
  1240. 8 21
  1241. 7 "Show Companies"
  1242. 8 22
  1243. 7 "Show People"
  1244. 8 23
  1245. 7 "OK"
  1246. 8 24
  1247. 7 "Cancel"
  1248. 8 25
  1249. 0 39 91
  1250. 13
  1251. 8 26
  1252. 20 00004655
  1253. 0 279 1
  1254. 13
  1255. 8 27
  1256. 0 279 2
  1257. 13
  1258. 8 28
  1259. 0 16 "{28}" "\" "{27}"
  1260. 13
  1261. 8 29
  1262. 6 29
  1263. 7 "\(Untitled)"
  1264. 18 0
  1265. 11 00000857
  1266. 0 3 "{11}"
  1267. 6 0
  1268. 15
  1269. 9
  1270. 5 35
  1271. 8 30
  1272. 7 ""
  1273. 8 31
  1274. 6 27
  1275. 8 32
  1276. 5 -1
  1277. 8 33
  1278. 5 1000
  1279. 21 34 [X]
  1280. 0 8 "{1}" "GetData"
  1281. 13
  1282. 8 35
  1283. 6 35
  1284. 5 0
  1285. 18 4
  1286. 11 00001317
  1287. 6 35
  1288. 8 36
  1289. 0 22 "{1}.EXE" "" 1
  1290. 13
  1291. 8 37
  1292. 6 37
  1293. 5 32
  1294. 18 3
  1295. 11 00001218
  1296. 0 8 "{1}" "GetData"
  1297. 13
  1298. 8 36
  1299. 6 36
  1300. 5 0
  1301. 18 0
  1302. 11 00001205
  1303. 0 801
  1304. 0 9 "{36}"
  1305. 0 296 0
  1306. 0 32 0
  1307. 0 801
  1308. 0 3 "{2}"
  1309. 0 789 ""
  1310. 0 296 0
  1311. 6 0
  1312. 15
  1313. 9
  1314. 10 00001317
  1315. 6 36
  1316. 5 0
  1317. 18 3
  1318. 11 00001260
  1319. 0 9 "{36}"
  1320. 0 32 0
  1321. 0 296 0
  1322. 0 801
  1323. 0 3 "{3}"
  1324. 0 789 ""
  1325. 6 0
  1326. 15
  1327. 9
  1328. 0 296 1
  1329. 5 1
  1330. 8 38
  1331. 0 10 "{35}" "{26}GetItemNames(Person,|)]"
  1332. 13
  1333. 8 39
  1334. 5 1
  1335. 6 8
  1336. 23 34
  1337. 5 2
  1338. 8 40
  1339. 5 1000
  1340. 6 40
  1341. 18 2
  1342. 12 00001499
  1343. 10 00001755
  1344. 5 1
  1345. 6 40
  1346. 3 0
  1347. 8 40
  1348. 10 00001418
  1349. 0 808 1 "{39}" "|"
  1350. 13
  1351. 8 41
  1352. 6 41
  1353. 5 0
  1354. 18 1
  1355. 11 00001698
  1356. 6 40
  1357. 6 41
  1358. 5 1
  1359. 3 1
  1360. 0 806 "{39}" [X]
  1361. 13
  1362. 23 34
  1363. 6 41
  1364. 5 1
  1365. 3 0
  1366. 0 14 "{39}"
  1367. 13
  1368. 6 41
  1369. 3 1
  1370. 0 15 "{39}" [X] [X]
  1371. 13
  1372. 8 39
  1373. 10 00001742
  1374. 6 40
  1375. 6 39
  1376. 23 34
  1377. 6 40
  1378. 8 42
  1379. 10 00001767
  1380. 10 00001464
  1381. 6 40
  1382. 8 42
  1383. 5 1
  1384. 8 40
  1385. 6 42
  1386. 6 40
  1387. 18 2
  1388. 12 00001857
  1389. 10 00001893
  1390. 5 1
  1391. 6 40
  1392. 3 0
  1393. 8 40
  1394. 10 00001778
  1395. 6 40
  1396. 22 34
  1397. 0 25 [X]
  1398. 10 00001822
  1399. 0 31 8002 "{32}"
  1400. 0 31 8001 "{31}"
  1401. 0 31 1003 "{21}"
  1402. 0 296 0
  1403. 0 26 "." "logdlg1"
  1404. 13
  1405. 8 43
  1406. 6 43
  1407. 5 0
  1408. 18 0
  1409. 11 00002042
  1410. 10 00004655
  1411. 10 00002183
  1412. 6 43
  1413. 5 1
  1414. 18 0
  1415. 11 00002098
  1416. 10 00003050
  1417. 10 00002183
  1418. 6 43
  1419. 5 3
  1420. 18 0
  1421. 11 00002183
  1422. 0 27 8001
  1423. 13
  1424. 8 31
  1425. 0 27 8002
  1426. 13
  1427. 8 32
  1428. 10 00002183
  1429. 0 296 1
  1430. 5 2
  1431. 8 38
  1432. 0 10 "{35}" "{26}GetItemNames(Company,|)]"
  1433. 13
  1434. 8 39
  1435. 5 1
  1436. 6 8
  1437. 23 34
  1438. 5 2
  1439. 8 40
  1440. 5 1000
  1441. 6 40
  1442. 18 2
  1443. 12 00002366
  1444. 10 00002622
  1445. 5 1
  1446. 6 40
  1447. 3 0
  1448. 8 40
  1449. 10 00002285
  1450. 0 808 1 "{39}" "|"
  1451. 13
  1452. 8 41
  1453. 6 41
  1454. 5 0
  1455. 18 1
  1456. 11 00002565
  1457. 6 40
  1458. 6 41
  1459. 5 1
  1460. 3 1
  1461. 0 806 "{39}" [X]
  1462. 13
  1463. 23 34
  1464. 6 41
  1465. 5 1
  1466. 3 0
  1467. 0 14 "{39}"
  1468. 13
  1469. 6 41
  1470. 3 1
  1471. 0 15 "{39}" [X] [X]
  1472. 13
  1473. 8 39
  1474. 10 00002609
  1475. 6 40
  1476. 6 39
  1477. 23 34
  1478. 6 40
  1479. 8 42
  1480. 10 00002634
  1481. 10 00002331
  1482. 6 40
  1483. 8 42
  1484. 5 1
  1485. 8 40
  1486. 6 42
  1487. 6 40
  1488. 18 2
  1489. 12 00002724
  1490. 10 00002760
  1491. 5 1
  1492. 6 40
  1493. 3 0
  1494. 8 40
  1495. 10 00002645
  1496. 6 40
  1497. 22 34
  1498. 0 25 [X]
  1499. 10 00002689
  1500. 0 31 8002 "{32}"
  1501. 0 31 8001 "{31}"
  1502. 0 31 1003 "{21}"
  1503. 0 296 0
  1504. 0 26 "." "logdlg2"
  1505. 13
  1506. 8 43
  1507. 6 43
  1508. 5 0
  1509. 18 0
  1510. 11 00002909
  1511. 10 00004655
  1512. 10 00003050
  1513. 6 43
  1514. 5 1
  1515. 18 0
  1516. 11 00002965
  1517. 10 00003050
  1518. 10 00003050
  1519. 6 43
  1520. 5 3
  1521. 18 0
  1522. 11 00003050
  1523. 0 27 8001
  1524. 13
  1525. 8 31
  1526. 0 27 8002
  1527. 13
  1528. 8 32
  1529. 10 00001317
  1530. 0 296 1
  1531. 0 27 9000
  1532. 13
  1533. 8 44
  1534. 0 27 8002
  1535. 13
  1536. 8 32
  1537. 0 14 "{32}"
  1538. 13
  1539. 6 30
  1540. 18 3
  1541. 11 00003174
  1542. 0 806 "{32}" "{30}"
  1543. 13
  1544. 8 32
  1545. 0 27 8001
  1546. 13
  1547. 8 31
  1548. 0 14 "{31}"
  1549. 13
  1550. 8 45
  1551. 0 14 "{31}"
  1552. 13
  1553. 5 190
  1554. 18 3
  1555. 11 00003289
  1556. 0 806 "{31}" 190
  1557. 13
  1558. 8 31
  1559. 6 32
  1560. 7 ""
  1561. 18 0
  1562. 11 00003431
  1563. 0 3 "{10}"
  1564. 6 38
  1565. 5 1
  1566. 18 0
  1567. 11 00003388
  1568. 10 00001767
  1569. 10 00003431
  1570. 6 38
  1571. 5 2
  1572. 18 0
  1573. 11 00003431
  1574. 10 00002634
  1575. 0 39 34
  1576. 13
  1577. 8 46
  1578. 0 16 "{26}AddItem(Letter Log," "{46}" "{32}" "{46}" ")]"
  1579. 13
  1580. 8 47
  1581. 0 11 "{35}" "{47}"
  1582. 13
  1583. 8 48
  1584. 6 48
  1585. 6 33
  1586. 18 0
  1587. 11 00003603
  1588. 0 3 "{9}"
  1589. 10 00004655
  1590. 0 16 "{26}EditItem(Letter Log," "{46}" "{32}" "{46}" ",Notes," "{46}"
  1591. 13
  1592. 8 47
  1593. 0 16 "{47}" "{31}" "{46}" ")]"
  1594. 13
  1595. 8 47
  1596. 0 11 "{35}" "{47}"
  1597. 13
  1598. 8 48
  1599. 6 48
  1600. 6 33
  1601. 18 0
  1602. 11 00003811
  1603. 0 3 "{9}"
  1604. 10 00004655
  1605. 0 16 "{26}EditItem(Letter Log," "{46}" "{32}" "{46}" ",Date Sent,Today)]"
  1606. 13
  1607. 8 47
  1608. 0 11 "{35}" "{47}"
  1609. 13
  1610. 8 48
  1611. 6 48
  1612. 6 33
  1613. 18 0
  1614. 11 00003981
  1615. 0 3 "{9}"
  1616. 10 00004655
  1617. 0 16 "{26}EditItem(Letter Log," "{46}" "{32}" "{46}" ",Reference File,"
  1618. 13
  1619. 8 47
  1620. 0 16 "{47}" "{46}" "{29}" "{46}" ")]"
  1621. 13
  1622. 8 47
  1623. 0 11 "{35}" "{47}"
  1624. 13
  1625. 8 48
  1626. 6 48
  1627. 6 33
  1628. 18 0
  1629. 11 00004198
  1630. 0 3 "{9}"
  1631. 10 00004655
  1632. 6 44
  1633. 6 8
  1634. 18 1
  1635. 11 00004642
  1636. 6 38
  1637. 5 1
  1638. 18 0
  1639. 11 00004399
  1640. 0 16 "{26}AssignConnection(Letter Log," "{46}" "{32}" "{46}"
  1641. 13
  1642. 8 47
  1643. 0 16 "{47}" "{12}" "{46}" "{44}" "{46}" ")]"
  1644. 13
  1645. 8 47
  1646. 10 00004557
  1647. 6 38
  1648. 5 2
  1649. 18 0
  1650. 11 00004557
  1651. 0 16 "{26}AssignConnection(Letter Log," "{46}" "{32}" "{46}"
  1652. 13
  1653. 8 47
  1654. 0 16 "{47}" "{13}" "{46}" "{44}" "{46}" ")]"
  1655. 13
  1656. 8 47
  1657. 0 11 "{35}" "{47}"
  1658. 13
  1659. 8 48
  1660. 6 48
  1661. 6 33
  1662. 18 0
  1663. 11 00004642
  1664. 0 3 "{9}"
  1665. 10 00004655
  1666. 10 00004655
  1667. 0 9 "{35}"
  1668. 0 296 0
  1669. 6 0
  1670. 15
  1671. 9
  1672. DIALOG logdlg1
  1673. -2134900736 10 90 36 196 194 "" "" "Commence Letter Log Macro" 
  1674. 8 20 108 12 8002 1350631552 "edit" "" 0 
  1675. 9 8 86 10 1001 1342177280 "static" "Log item name:" 0 
  1676. 9 50 174 13 8001 1350631552 "edit" "" 0 
  1677. 9 38 40 10 1009 1342177280 "static" "Notes:" 0 
  1678. 9 71 70 10 1002 1342177280 "static" "Refers to Person:" 0 
  1679. 9 84 173 62 9000 1352728577 "listbox" "" 0 
  1680. 21 177 145 9 1003 1342177281 "static" "" 0 
  1681. 63 154 59 14 3 1342242816 "button" "Get Companies" 0 
  1682. 143 9 40 14 1 1342242816 "button" "OK" 0 
  1683. 143 28 40 14 2 1342242816 "button" "Cancel" 0 
  1684. DIALOG logdlg2
  1685. -2134900736 10 89 36 196 190 "" "" "Commence Letter Log Macro" 
  1686. 8 20 108 12 8002 1350631552 "edit" "" 0 
  1687. 9 8 86 10 1001 1342177280 "static" "Log item name:" 0 
  1688. 9 50 174 13 8001 1350631552 "edit" "" 0 
  1689. 9 38 40 10 1009 1342177280 "static" "Notes:" 0 
  1690. 9 69 70 10 1002 1342177280 "static" "Refers to Company:" 0 
  1691. 9 81 173 65 9000 1352728577 "listbox" "" 0 
  1692. 21 174 145 9 1003 1342177281 "static" "" 0 
  1693. 63 154 59 14 3 1342242816 "button" "Get People" 0 
  1694. 143 9 40 14 1 1342242816 "button" "OK" 0 
  1695. 143 28 40 14 2 1342242816 "button" "Cancel" 0 
  1696. 00014205
  1697.