Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Mail Merge
Message
 
À
23/04/2012 17:15:34
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows 7
Divers
Thread ID:
01542272
Message ID:
01542413
Vues:
87
This message has been marked as the solution to the initial question of the thread.
>OK, we're making progress. With Dragan's help I got past the prior compile error. Now, I'm receiving:
>
>"OLE IDispatch exception code 0 from Microsoft Word: String is longer than 255 characters.."
>
>at: wdMergeSubTypeAccess) && SubType
>
>Any suggestions?
>
>As always, thank you so much!
#define wdMergeSubTypeAccess 1
#define wdOpenFormatAuto     0

lcFile = m.dir+"data\labels.xls"
lcConnection = [Provider=Microsoft.Jet.OLEDB.4.0;Data Source=]+m.lcFile+[;Extended Properties="HDR=Yes;IMEX=1";]

oWord.ActiveDocument.MailMerge.OpenDataSource(m.lcFile,;                && Name
                                             wdOpenFormatAuto,;         && Format
                                             .f.,;                      && ConfirmConversions
                                             .f.,;                      && ReadOnly
                                             .t.,;                      && LinkToSource
                                             .f.,;                      && AddToRecentFiles
                                             "",;                       && PasswordDocument
                                             "",;                       && PasswordTemplate
                                             .f.,;                      && Revert
                                             "",;                       && WritePasswordDocument
                                             "",;                       && WritePasswordTemplate
                                             m.lcConnection,;           && Connection
                                             "SELECT * FROM `Sheet1$`",; &&SQLStatement
                                              "",;                       &&SQLStatement1
                                              .f.,;                      && OpenExclusive
                                               wdMergeSubTypeAccess)     && SubType
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform