home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual Foxpro 6.0 (Ent. Edition) / Vf6ent Extractor.EXE / TOOLS / XSOURCE / XSOURCE.ZIP / vfpsource / wizards / automate / MAILMRGE.H < prev    next >
Encoding:
Text File  |  1998-05-01  |  6.4 KB  |  173 lines

  1. *- MAILMRGE.H
  2. *- #DEFINEs for MAILMRGE.VCX
  3.  
  4. #DEFINE L_DEBUG .F.
  5.  
  6. *- localize these
  7. #DEFINE C_STARTWORD60_LOC    "Starting Microsoft Word ..."
  8. #DEFINE C_STARTWORD20_LOC    "Starting Microsoft Word 2.0..."
  9. #DEFINE C_STARTWORD80_LOC    "Starting Microsoft Word ..."
  10. #DEFINE C_OPENDATA80_LOC    "Opening data source..."
  11. #DEFINE C_MMSAVEAS_LOC        "Save merge data as:"
  12. #DEFINE C_DFLTNAME_LOC        "mrgdata.txt"
  13. #DEFINE C_DFLTDBF_LOC        "mrgdata.dbf"
  14.  
  15. #DEFINE E_NOOPENWORD_LOC    "Failed to get Word OLE Object."
  16. #DEFINE E_FILEERR_LOC        "Error writing merge data."
  17. #DEFINE E_NOMSWLAUNCH_LOC    "Cannot start Microsoft Word."
  18. #DEFINE E_WRONGWORD_LOC        "The wrong version of Microsoft Word is running. Mail merge canceled."
  19. #DEFINE E_NOWORDERR_LOC        "Microsoft Word for Windows @1 can not be located on this computer."
  20. #DEFINE E_NOWORDMACERR_LOC    "Microsoft Word for the Macintosh 6.0 is not installed on this computer."
  21. #DEFINE E_MSWCOMMFAIL_LOC    "Cannot complete task. Check MS Word for open dialog or other problem..."
  22. #DEFINE E_NODBC_LOC            "DBC Tables are not supported yet by ODBC drivers. You must use a FoxPro free table."
  23. #DEFINE E_DDEERR_LOC        "The last DDE action was unsuccessful. The DDE error code is @1."
  24.  
  25. *- error messages for bad values in MailMerge class
  26. #DEFINE E_BADWORDPROC_LOC    "Invalid value for word processor."
  27. #DEFINE E_BADEXDOC_LOC        "No existing document was specified."
  28. #DEFINE E_BADMRGDATA_LOC    "No destination for merge data was specified."
  29. #DEFINE E_BADTEMPLATE_LOC    "Invalid value for Word template."
  30. #DEFINE E_NODATA_LOC        "No data source was specified."
  31. #DEFINE E_NOFIELDS_LOC        "No data fields were specified."
  32.  
  33. #DEFINE    E_ODBC1_LOC            "Could not check ODBC.INI file. Check to see if ODBC is properly installed."
  34. #DEFINE    E_ODBC2_LOC            "Could not find FoxPro Files ODBC driver. Check to see if it is installed."
  35. #DEFINE    E_ODBC3_LOC            "Invalid FoxPro Files entry in ODBC.INI file."
  36. #DEFINE    E_ODBCDLL_LOC        "Could not check for proper ODBC installed files."
  37.  
  38. #DEFINE E_NOOPENTBL_LOC        "Cannot open data table for shared use. Mailmerge cancelled."
  39. #DEFINE E_NOREPLACETBL_LOC    "Unable to replace file. Mailmerge cancelled."
  40. #DEFINE E_NOAPPLESCRIPT_LOC    "AppleScript" + CHR(170) + " is not installed on this machine. Launch Word and manually complete the Mail Merge."
  41.  
  42. #DEFINE C_LOCATEDLL_LOC        "The wizard could not verify that you have ODBC installed. Do you want to continue with the assumption that it is?"
  43. #DEFINE C_NOVERIFYMSW_LOC    "The wizard could not verify that you have Microsoft Word installed. Do you want to continue with the assumption that it is?"
  44. #DEFINE C_COPYFOX2_LOC        "You do not have ODBC drivers for Visual FoxPro 3.0 tables. "+;
  45.                             "Would you like to copy the selected table to a FoxPro 2.5 "+;
  46.                             "type so that a merge data file can be generated from it?"
  47. #DEFINE C_COPYFOX3_LOC        "You have selected a view as your data source. " + ;
  48.                             "You must copy the view so that a merge data file can be generated from it. Proceed?"
  49. #DEFINE C_COPYPROMPT_LOC    "Copy table to:"    
  50. #DEFINE C_ERROR_SQL_LOC        "The generated SQL statement is too long. Please select fewer fields."
  51. #DEFINE C_LOCATE_LOC        "Locate "
  52. #DEFINE    C_ODBCOLDVER_LOC    "The Version setting in your FoxPro Files ODBC Data Source is set for FoxPro 2.0 files. "+;
  53.                             "The MailMerge Wizard may not properly handle international characters or General fields. "+;
  54.                             "You can change this setting to FoxPro 2.6 using the ODBC Control Panel."
  55. #DEFINE    C_EXCLDBC1_LOC        "Word cannot merge data from the selected database '"
  56. #DEFINE    C_EXCLDBC2_LOC        "' unless it is opened shared. Would you like the MailMerge Wizard to reopen it shared for you?"
  57.  
  58.  
  59. *- don't localize these
  60.  
  61. *- if these are changed, also change in MAILMRGE.H
  62. *- supported word procs/merge types
  63. #DEFINE        N_WORD60        1
  64. #DEFINE        N_WORD20        3        && not supported in 5.0
  65. #DEFINE        N_COMMADELIM    2
  66.  
  67. *- new/old doc
  68. #DEFINE        N_NEW_DOC        1
  69. #DEFINE        N_EXISTING_DOC    2
  70.  
  71. *- template types
  72. #DEFINE        N_FORMLETTER    1
  73. #DEFINE        N_LABEL            2
  74. #DEFINE        N_ENVELOPE        3
  75. #DEFINE        N_CATALOG        4
  76.  
  77. *- used in startword
  78. #DEFINE C_MSWORDMAC        "Microsoft Word"
  79. #DEFINE C_MSWORDEXE        "winword.exe"
  80. #DEFINE C_MSWORDWIN        "Winword"
  81. #DEFINE C_MSWORDCREATOR    "MSWD"
  82.  
  83. #DEFINE C_WORD2                "2.0"
  84. #DEFINE C_WORD6                "6.0"
  85. #DEFINE C_WORD6_OR_LATER    "6.0"
  86. #DEFINE C_WORD8                "8.0"
  87.  
  88. *- MSW 2.0 values
  89. #DEFINE C_WIN_SECT2            "Microsoft Word 2.0"
  90.  
  91. *- MSW 6.0 values
  92. #DEFINE C_WIN_SECT6            "Microsoft Word"
  93. #DEFINE C_WIN_MSW6INI        "Winword6.INI"
  94.  
  95. #DEFINE C_WIN_DIR            "programdir"
  96.  
  97. *- entry in Mac FoxPro settings file
  98. #DEFINE C_FOXPROINI_MAC        "Visual Foxpro Settings"
  99. #DEFINE C_WORD6ID            "Word6Loc"
  100. #DEFINE C_MAILMRG_SECT        "Mailmerge"
  101. #DEFINE C_WORDSETTINGS        "Word Settings (6)"
  102.  
  103. *- DDE Errors
  104. #DEFINE N_BADCHANNELERR         6
  105. #DEFINE N_TIMEOUTERR         9
  106. #DEFINE N_NOCLIENTERR        13
  107.  
  108. *- AppleScript related errors
  109. #DEFINE N_RUNSCRIPTFAIL        1921    && VFP error numbers
  110. #DEFINE N_SCRIPTERROR        1917
  111.  
  112. #DEFINE L_GETFILE            .T.
  113. #DEFINE L_DONTGETFILE        .F.
  114.  
  115. #DEFINE K_HIGHTIMEOUT    20000
  116. #DEFINE K_DFLTTIMEOUT     2000
  117.  
  118. *- MSW 2.0 values
  119. #DEFINE WIN_SECT2    "Microsoft Word 2.0"
  120. #DEFINE WIN_DIR        "programdir"
  121.  
  122. *- MSW 6.0 values
  123. #DEFINE WIN_SECT6    "Microsoft Word"
  124. #DEFINE WIN_MSW6INI    "Winword6.INI"
  125. #DEFINE WIN_6OBJ    "word.basic"
  126.  
  127. *- MSW 8.0 values
  128. #DEFINE WIN_8OBJ    "word.application.8"
  129.  
  130. *- ODBC Driver info
  131. #DEFINE K_TAB            CHR(9)
  132. #DEFINE C_CRLF            CHR(13) + CHR(10)
  133. #DEFINE C_CR            CHR(13)
  134.  
  135. #DEFINE K_TOOLONG        150        && max length of a SQL statement for DDE
  136. #DEFINE K_TRANSFER        1024 * 20
  137.  
  138. #DEFINE K_LOCALVIEW        1
  139. #DEFINE K_REMOTEVIEW    2
  140. #DEFINE K_TABLE            3
  141.  
  142. #DEFINE    DBFTYPE_30        48
  143.  
  144. #DEFINE EXT_DBF            "DBF"
  145. #DEFINE EXT_TXT            "TXT"
  146.  
  147. ******************************************************************************
  148. * Used by GetOS and other methods
  149. ******************************************************************************
  150. * Operating System codes
  151. #DEFINE    OS_W32S                1
  152. #DEFINE    OS_NT                2
  153. #DEFINE    OS_WIN95            3
  154. #DEFINE    OS_MAC                4
  155. #DEFINE    OS_DOS                5
  156. #DEFINE    OS_UNIX                6
  157.  
  158.  
  159. #DEFINE    REG_MSWDOC_KEY        "Word.Document"
  160.  
  161. #DEFINE    I_ENGLISH            1033            && code for English
  162.  
  163. #DEFINE    FOXODBC_ANY            "FoxPro"
  164.  
  165. #DEFINE I_WDDIALOGMAILMERGEHELPER    680        && Word code for Mailmerge Helper dialog
  166.  
  167. *- registry codes
  168. #DEFINE    ERROR_SUCCESS        0
  169. #DEFINE    ERROR_NOINIFILE        -108    && no DLL file used to check ODBC
  170. #DEFINE    ERROR_NOINIENTRY    -109    && no entry found in INI file (section)
  171. #DEFINE    ERROR_FAILINI        -110    && no entry found in INI file
  172.  
  173. *- eof  MAILMRGE.H