Developer Guidelines - multiplicit-com/Office2KDP GitHub Wiki
Developer Guidelines
Want to fork, customize, or contribute to Office2KDP? Great!
This page gives you an overview of how the tool is structured, and how to safely extend or adapt it.
Project Structure
The workbook is divided into tabs (sheets) by purpose:
Your Document
: Primary settings input (dropdowns + values)MS Word (.docx)
andMS Word (.pdf)
: Export-ready outputsCover
: Cover size calculationsSettings
: Data tables for trim sizes, margins, header/footer presets, section start types, etc.License
,Notes
,Visuals
: Documentation and metadata
Named Range Conventions
Named Ranges
are defined throughout the workbook to simplify formulas and VBA reference. Named ranges are used heavily and follow a consistent naming pattern:
-
INTERIOR_ – All manuscript layout settings
e.g.INTERIOR_PageWidth
,INTERIOR_GutterSize
,INTERIOR_TopMargin
-
COVER_ – All cover and spine settings
These are critical for the macros to work correctly. When adding new features, use consistent prefixes to avoid confusion.
Macros
The CreateKDPWordTemplate
macro is the primary automation feature. It reads from named ranges and creates a formatted Word document.
You can find it in the VBA editor under: