Voici des exemples de codes VBA pour la gestion des documents Office. Certains dépendent d’une base de données Access.
Tout le code est fourni tel quel, sans garantie.
J'expliquerai comment fonctionne tout ce code et plus encore sur mon blog à https://transcription.aquoco.co/.
Actuellement inscrit au cursus de développement Web full-stack de la Lambda School.
freeCodeCamp : https://www.freecodecamp.com/evoingram
Hackerrank : https://www.hackerrank.com/evoingram
Pluralsight : https://app.pluralsight.com/profile/erica-ingram
Entreprise : https://www.aquoco.co
je suis un programmeur autodidacte, je travaille sur un portfolio, mais voici une partie de mon code VBA pour l'instant. Il y a tout un tas de bonnes choses ici.
Brève description de la fonction :
AcrobatGetNumPages:
gets number of pages from PDF and confirms with you
AddAQCExamStyle:
finds specific phrases in activedocument(transcript) and applies a specific style
BuildRCWsAndRCWHyperlinks:
Acquires RCWs and their hyperlinks, validates them, and adds an entry for each one to CitationHyperlinks table
BuildUSCRulesandUSCHyperlinks:
validates U.S.C. code citations and builds corresponding hyperlinks, no front matter, no appendices
AutoCalculateInterest:
add 1% interest cost after every 7 days payment not made
AutoCorrect:
adds autocorrect entries as listed on form (from matching table row) to rough draft autocorrect in Word
CDLabelMergeF:
makes CD label and prompts for print or no
CommunicationHistoryAdd:
adds entry to CommunicationHistory table in Access DB
CreateIndexBMKs:
replaces #TOC_# notations in transcript with bookmarks and then places index at bookmarks
CreateIndexesTOAs:
creates several TOCs that are marked differently and several sections of tables of authority.
example: separate TOCs for exhibits, witnesses, and a general index
separate TOAs, three sections, one for cases, one for rules/regs/statutes/code/etc, one for other authority
CreateWorkingCopy:
creates "working copy" sent to client
FPJurors:
does find/replacements of prospective juror shorthand in transcript
FillInPDFfromDatabase:
inserts page count & other transcript info into invoice PDF
FindAndReplaceCitationHyperlinks:
adds citations and hyperlinks from CitationHyperlinks table in transcript
GenerateInvoiceAndEmailWithPPButton:
generates invoice and Outlook e-mail body to include a linked PP button
GenerateInvoiceNumber:
generates invoice number
GenericExportandMailMerge:
exports to specified template from T:Document GeneratorTemplates and saves in T:In ProgresssCourtDatesID
HeadersFooters:
programmatically adds headers and footers
OneNoteVBA-CreatePage:
Creates pages in a specified OneNote notebook
OneNoteVBA-GetNotebooks:
Returns list of OneNote notebooks
OneNoteVBA-GetPages:
Returns pages of a OneNote notebook
OneNoteVBA-GetSectionGroups:
Returns section groups of a OneNote notebook
OneNoteVBA-GetSections:
Returns sections of a OneNote notebook
OneNoteVBA-SearchPageTitlesReturnResults:
Returns OneNote pages that match a search result
ReadXML:
reads shipping XML and sends "Shipped" email to client
SendWordDocAsEmail:
sends Word document as an e-mail body with optional attachments
TCEntryReplacementPARENT:
parent function that finds certain entries within a transcript & assigns TC entries to them for indexing purposes
TCEntryReplacementCHILD-SingleReplaceAll
one replace TC entry function for ones with no field entry
TCEntryReplacementCHILD-FieldReplaceAll
one replace TC entry function for ones with field entry
WordIndexer:
builds word index in separate docx & PDF from transcript
WunderlistAdd:
arguments sTitle as string, sDueDate as string, due date format YYYY-MM-DD
adds task to Wunderlist
WunderlistGetAllLists:
gets all lists from Wunderlist
WunderlistGetList:
gets tasks from an existing wunderlist list
~MySQLExamples
samples of actual queries from my database.