|
| Export en PDF avec signet et Titres |
| Iniciado por THIERRY TILLIER, 05,jul. 2020 14:03 - 3 respuestas |
| |
| | | |
|
| |
Miembro registrado 1.173 mensajes |
|
| Publicado el 05,julio 2020 - 14:03 |
Bonjour à tous,
J'essaie d'exporter un document WORD avec la classe cword et mon document Word contient des titres et sous-titres que veux exporter dans le PDF. J'utiliser le code ci-dessous mais les signet ne sont pas créés.
:m_pautWord>>ActiveDocument>>ExportAsFixedFormat(sNomDocPDF, ::CST_wdExportFormatPDF, Faux,Faux,0,0,7,Faux, ::CST_WdExportCreateBookmarks)
avec ::CST_WdExportCreateBookmarks=2 selon la doc API Word
Quelqu'un a-t-il déjà réussi cela ?
Merci de votre aide Thierry
-- Thierry TILLIER Développeur Windev-Webdev Formation Windev : https://coursdinfo.teachable.com/ Formation bureautique : https://coursdinfo.net |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 1.173 mensajes |
|
| Publicado el 05,julio 2020 - 14:08 |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 962 mensajes |
|
| Publicado el 06,julio 2020 - 07:21 |
hello, d'après la doc Microsoft , le paramètre de création de signets est le 11 ème (pas dans ton code où il y a aussi d'autres paramètres qui sont au mauvais endroit)
expression. ExportAsFixedFormat (OutputFileName, ExportFormat, OpenAfterExport, OptimizeFor, Range, from, to, Item, IncludeDocProps, KeepIRM, CreateBookmarks, DocStructureTags, BitmapMissingFonts, UseISO19005_1, FixedFormatExtClassPtr)
Voici un code qui marche chez moi avec word 2010 :
word>>ActiveDocument>>ExportAsFixedFormat(monDocument + ".pdf", 17, Faux,0,0,1,1,0,Faux,Faux,1)
-- Ami calmant, J.P |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 1.173 mensajes |
|
| Publicado el 06,julio 2020 - 18:08 |
Merci, j'avais bien 11 paramètres mais j'ai l'impression ne pas avoir tout sélectionné pour le copier coller. Quoiqu'il en soit votre paramétrage fonctionne (avec Office 2019 / 365)

-- Thierry TILLIER Développeur Windev-Webdev Formation Windev : https://coursdinfo.teachable.com/ Formation bureautique : https://coursdinfo.net |
| |
| |
| | | |
|
| | | | |
| | |
|