pH Atlas — VBA Script
Executive-level PowerPoint generator (13 slides)
How to use
Generate the full executive deck in PowerPoint
- Download the
.basfile below or copy the script to clipboard. - Open PowerPoint and press Alt + F11 to open the VBA Editor.
- In the VBA Editor: File → Import File… and select the downloaded
PHAtlas_Deck.bas. - Press Ctrl + G to open the Immediate Window.
- Type
CreatePHAtlasDeckand press Enter. - A 13-slide executive deck will be generated automatically.
22,963 chars · 13 slides
Attribute VB_Name = "PHAtlasGenerator"
Option Explicit
' ============================================================================
' pH Atlas — Executive-Level Presentation Generator
' Run CreatePHAtlasDeck() in the PowerPoint VBA Editor (Alt+F11 → Immediate Window)
' Late-binding version — no references required.
' ============================================================================
' ---- Brand palette ----
Private Const CLR_BG As Long = 15921906 ' #F4F8F9 light medical white
Private Const CLR_DARK As Long = 2500134 ' #262626 near-black
Private Const CLR_TEAL As Long = 5964801 ' #5B9B96 muted teal
Private Const CLR_ACCENT As Long = 13340159 ' #7FCBC4 light teal
Private Const CLR_MUTED As Long = 8421504 ' #808080 mid gray
Private Const CLR_WHITE As Long = 16777215
Private Const CLR_EMER As Long = 51200 ' emerald
Private Const CLR_AMBER As Long = 39423 ' amber
Private Const CLR_ROSE As Long = 255 ' rose
' ---- Enum constants (late binding) ----
Private Const msoTrue As Long = -1
Private Const msoFalse As Long = 0
Private Const msoAlignLeft As Long = 1
Private Const msoAlignCenter As Long = 2
Private Const msoAlignRight As Long = 3
Private Const msoTextOrientationHorizontal As Long = 1
Private Const msoShapeRectangle As Long = 1
Private Const msoShapeRoundedRectangle As Long = 5
Private Const ppLayoutBlank As Long = 12
Private Const ppSlideSizeOnScreen16x9 As Long = 15
' ---- Entry point ----
Public Sub CreatePHAtlasDeck()
Dim prs As Object
Set prs = Application.Presentations.Add(msoTrue)
' Use 16:9
prs.PageSetup.SlideSize = ppSlideSizeOnScreen16x9
prs.PageSetup.SlideWidth = 960
prs.PageSetup.SlideHeight = 540
Slide_Title prs
Slide_Agenda prs
Slide_ExecutiveSummary prs
Slide_Problem prs
Slide_Solution prs
Slide_ProductFeatures prs
Slide_ClinicalData prs
Slide_SystemMap prs
Slide_CheckerFlow prs
Slide_MarketPosition prs
Slide_Roadmap prs
Slide_NextSteps prs
Slide_ThankYou prs
MsgBox "pH Atlas executive deck generated: " & prs.Slides.Count & " slides.", vbInformation, "pH Atlas"
End Sub
' =========================================================================
' Helper: add a slide with a clean background
' =========================================================================
Private Function NewSlide(ByVal prs As Object, ByVal layout As Long) As Object
Dim sld As Object
Set sld = prs.Slides.Add(prs.Slides.Count + 1, layout)
sld.Layout = ppLayoutBlank
sld.FollowMasterBackground = msoFalse
sld.Background.Fill.ForeColor.RGB = CLR_BG
Set NewSlide = sld
End Function
Private Sub AddBar(ByVal sld As Object, ByVal Left As Single, ByVal Top As Single, ByVal Width As Single, ByVal Height As Single, ByVal color As Long)
Dim shp As Object
Set shp = sld.Shapes.AddShape(msoShapeRectangle, Left, Top, Width, Height)
shp.Fill.ForeColor.RGB = color
shp.Line.Visible = msoFalse
shp.Shadow.Visible = msoFalse
End Sub
Private Sub AddText(ByVal sld As Object, ByVal Left As Single, ByVal Top As Single, ByVal Width As Single, ByVal Height As Single, _
ByVal text As String, ByVal fontSize As Single, ByVal color As Long, ByVal bold As Boolean, _
Optional ByVal align As Long = msoAlignLeft, Optional ByVal fontName As String = "Calibri")
Dim shp As Object
Set shp = sld.Shapes.AddTextbox(msoTextOrientationHorizontal, Left, Top, Width, Height)
shp.TextFrame.WordWrap = msoTrue
shp.TextFrame.MarginLeft = 0
shp.TextFrame.MarginRight = 0
shp.TextFrame.MarginTop = 0
shp.TextFrame.MarginBottom = 0
With shp.TextFrame.TextRange
.text = text
.Font.Size = fontSize
.Font.Color.RGB = color
.Font.bold = bold
.Font.name = fontName
.ParagraphFormat.Alignment = align
End With
End Sub
Private Sub AddTitleBar(ByVal sld As Object, ByVal title As String, ByVal subtitle As String)
AddBar sld, 0, 0, 960, 6, CLR_TEAL
AddText sld, 60, 36, 840, 36, title, 26, CLR_DARK, True
If Len(subtitle) > 0 Then
AddText sld, 60, 78, 840, 28, subtitle, 13, CLR_MUTED, False
End If
AddBar sld, 60, 72, 40, 2, CLR_ACCENT
End Sub
Private Sub AddFooter(ByVal sld As Object, ByVal pageNum As Integer)
AddText sld, 60, 510, 400, 20, "pH Atlas · Executive Brief · Educational use only", 8, CLR_MUTED, False
AddText sld, 820, 510, 80, 20, CStr(pageNum), 8, CLR_MUTED, False, msoAlignRight
End Sub
Private Sub AddCard(ByVal sld As Object, ByVal Left As Single, ByVal Top As Single, ByVal Width As Single, ByVal Height As Single, _
ByVal heading As String, ByVal body As String, Optional ByVal accentColor As Long = CLR_TEAL)
Dim shp As Object
Set shp = sld.Shapes.AddShape(msoShapeRoundedRectangle, Left, Top, Width, Height)
shp.Fill.ForeColor.RGB = CLR_WHITE
shp.Line.ForeColor.RGB = RGB(226, 232, 240)
shp.Line.Weight = 1
shp.Adjustments(1) = 0.04
shp.Shadow.Visible = msoTrue
shp.Shadow.Size = 3
shp.Shadow.OffsetX = 0
shp.Shadow.OffsetY = 1
shp.Shadow.Transparency = 0.7
Dim bar As Object
Set bar = sld.Shapes.AddShape(msoShapeRoundedRectangle, Left, Top, 4, Height)
bar.Fill.ForeColor.RGB = accentColor
bar.Line.Visible = msoFalse
bar.Adjustments(1) = 0.5
AddText sld, Left + 16, Top + 12, Width - 28, 24, heading, 12, CLR_DARK, True
AddText sld, Left + 16, Top + 40, Width - 28, Height - 52, body, 10, CLR_MUTED, False
End Sub
' =========================================================================
' SLIDE 1 — Title
' =========================================================================
Private Sub Slide_Title(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
sld.Background.Fill.ForeColor.RGB = CLR_BG
AddBar sld, 0, 0, 960, 540, CLR_BG
AddBar sld, 0, 0, 340, 540, CLR_TEAL
AddText sld, 60, 230, 260, 40, "pH", 72, CLR_WHITE, True, msoAlignLeft
AddText sld, 60, 310, 260, 30, "ATLAS", 28, CLR_ACCENT, True, msoAlignLeft
AddText sld, 60, 350, 260, 20, "Clinical Reference Platform", 11, CLR_WHITE, False
AddText sld, 400, 160, 500, 30, "EXECUTIVE BRIEF", 11, CLR_TEAL, True
AddText sld, 400, 200, 500, 60, "pH Atlas", 44, CLR_DARK, True
AddText sld, 400, 270, 500, 60, "A community-friendly map of pH across the human body.", 16, CLR_MUTED, False
AddText sld, 400, 340, 500, 40, "One spectrum · Plain-language explanations · Interactive checker", 11, CLR_MUTED, False
AddBar sld, 400, 430, 60, 3, CLR_ACCENT
AddText sld, 400, 446, 500, 20, "Prepared for Executive Review", 10, CLR_MUTED, False
End Sub
' =========================================================================
' SLIDE 2 — Agenda
' =========================================================================
Private Sub Slide_Agenda(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "Agenda", "What we'll cover today"
Dim items As Variant
items = Array( _
"01 Executive Summary", _
"02 The Problem", _
"03 Our Solution", _
"04 Product Features", _
"05 Clinical Data Foundation", _
"06 System Map & Checker", _
"07 Market Positioning", _
"08 Roadmap & Next Steps")
Dim i As Integer
Dim y As Single
For i = 0 To UBound(items)
y = 140 + i * 42
AddText sld, 80, y, 600, 28, items(i), 14, CLR_DARK, False
AddBar sld, 80, y + 28, 180, 1, RGB(226, 232, 240)
Next i
AddFooter sld, 2
End Sub
' =========================================================================
' SLIDE 3 — Executive Summary
' =========================================================================
Private Sub Slide_ExecutiveSummary(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "Executive Summary", "pH Atlas at a glance"
AddCard sld, 60, 130, 400, 170, "What", _
"A web-based clinical reference tool that maps physiological pH values across every major body system onto a single interactive spectrum — with a built-in checker for interpreting measured readings.", CLR_TEAL
AddCard sld, 490, 130, 400, 170, "Why", _
"pH values are scattered across dozens of disconnected references. pH Atlas consolidates them into one accessible, community-friendly interface — lowering the barrier to understanding acid-base health.", CLR_ACCENT
AddCard sld, 60, 320, 400, 160, "Who", _
"Designed for health-curious individuals, students, and clinicians who want a fast, reliable pH reference at their fingertips — with clear guidance to seek professional interpretation.", CLR_TEAL
AddCard sld, 490, 320, 400, 160, "Impact", _
"38 peer-reviewed sources consolidated. 13 body sites mapped. One unified spectrum. Zero ambiguity in where a reading falls — and what it might mean.", CLR_ACCENT
AddFooter sld, 3
End Sub
' =========================================================================
' SLIDE 4 — The Problem
' =========================================================================
Private Sub Slide_Problem(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "The Problem", "pH information is fragmented and inaccessible"
AddText sld, 60, 130, 840, 30, "Today, finding a reliable pH reference for a specific body site requires:", 13, CLR_DARK, False
AddCard sld, 60, 180, 260, 140, "Fragmented Sources", _
"pH ranges live across dozens of textbooks, journals, and clinical databases — none consolidated in one place.", CLR_ROSE
AddCard sld, 340, 180, 260, 140, "Technical Language", _
"Existing references assume clinical training. There is no community-friendly entry point for non-specialists.", CLR_ROSE
AddCard sld, 620, 180, 260, 140, "No Context", _
"A raw number without context — where does it sit on the spectrum? Is it normal? What should I ask my doctor?", CLR_ROSE
AddText sld, 60, 350, 840, 30, "The result: confusion, self-misdiagnosis, and missed clinical conversations.", 13, CLR_TEAL, True
AddFooter sld, 4
End Sub
' =========================================================================
' SLIDE 5 — Our Solution
' =========================================================================
Private Sub Slide_Solution(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "Our Solution", "One spectrum. Every system. Plain language."
AddBar sld, 60, 200, 840, 24, CLR_BG
Dim colors As Variant, labels As Variant
colors = Array(CLR_ROSE, CLR_AMBER, CLR_EMER, CLR_TEAL, CLR_ACCENT)
labels = Array("0", "3.5", "5.5", "7.4", "10", "14")
Dim i As Integer
For i = 0 To 4
AddBar sld, 60 + i * 168, 200, 168, 24, colors(i)
Next i
For i = 0 To 5
AddText sld, 40 + i * 168, 230, 60, 20, labels(i), 8, CLR_MUTED, False
Next i
AddText sld, 60, 170, 840, 20, "THE UNIVERSAL pH SPECTRUM", 10, CLR_TEAL, True
AddCard sld, 60, 280, 260, 160, "Consolidated", _
"38 peer-reviewed sources mapped to 13 body sites — every major system covered in one view.", CLR_TEAL
AddCard sld, 340, 280, 260, 160, "Interactive", _
"Hover any site to see its band on the spectrum. Enter a reading to see exactly where it lands.", CLR_ACCENT
AddCard sld, 620, 280, 260, 160, "Community-Friendly", _
"Plain-language explanations, doctor discussion prompts, and clear guidance on when to seek care.", CLR_TEAL
AddFooter sld, 5
End Sub
' =========================================================================
' SLIDE 6 — Product Features
' =========================================================================
Private Sub Slide_ProductFeatures(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "Product Features", "Four integrated modules"
AddCard sld, 60, 130, 420, 160, "01 pH Reference Panel", _
"Full 0-14 spectrum with zoomed near-neutral view. Hoverable site chips. System-by-system table with zone tags. Reproductive and cardiovascular deep-dives.", CLR_TEAL
AddCard sld, 500, 130, 420, 160, "02 Clinical Signals", _
"Acidic and alkaline shift indicators mapped to each body system. Critical-deviation sites highlighted. Plain-language interpretation of what a shift means.", CLR_ACCENT
AddCard sld, 60, 310, 420, 160, "03 Interactive Checker", _
"Select a body site, enter a measured pH, and get instant placement on the spectrum, range validation, clinical checks, and disease-pattern awareness.", CLR_TEAL
AddCard sld, 500, 310, 420, 160, "04 Reference Library", _
"38 sources organized into 7 topic groups — systemic physiology, CKD therapy, stone prevention, exercise buffering, skin, dental, and reproductive pH.", CLR_ACCENT
AddFooter sld, 6
End Sub
' =========================================================================
' SLIDE 7 — Clinical Data Foundation
' =========================================================================
Private Sub Slide_ClinicalData(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "Clinical Data Foundation", "Representative pH ranges by body system"
Dim tbl As Object
Dim rows As Integer, cols As Integer
rows = 8: cols = 3
Set tbl = sld.Shapes.AddTable(rows, cols, 60, 130, 840, 350).Table
tbl.Cell(1, 1).Shape.TextFrame.TextRange.text = "System"
tbl.Cell(1, 2).Shape.TextFrame.TextRange.text = "Site"
tbl.Cell(1, 3).Shape.TextFrame.TextRange.text = "Typical pH"
Dim c As Integer
For c = 1 To 3
With tbl.Cell(1, c)
.Shape.Fill.ForeColor.RGB = CLR_TEAL
.Shape.TextFrame.TextRange.Font.Color.RGB = CLR_WHITE
.Shape.TextFrame.TextRange.Font.bold = True
.Shape.TextFrame.TextRange.Font.Size = 11
End With
Next c
Dim data As Variant
data = Array( _
"Digestive|Stomach|1.5-3.5", _
"Circulatory|Arterial Blood|7.35-7.45", _
"Integumentary|Skin Surface|4.7-5.7", _
"Renal|Urine|4.5-8.0", _
"Reproductive|Vaginal|3.8-4.5", _
"Nervous|CSF|7.3-7.5", _
"Reproductive|Semen|7.2-8.0")
Dim r As Integer
For r = 0 To UBound(data)
Dim parts() As String
parts = Split(data(r), "|")
tbl.Cell(r + 2, 1).Shape.TextFrame.TextRange.text = parts(0)
tbl.Cell(r + 2, 2).Shape.TextFrame.TextRange.text = parts(1)
tbl.Cell(r + 2, 3).Shape.TextFrame.TextRange.text = parts(2)
For c = 1 To 3
With tbl.Cell(r + 2, c)
.Shape.Fill.ForeColor.RGB = IIf(r Mod 2 = 0, CLR_BG, CLR_WHITE)
.Shape.TextFrame.TextRange.Font.Size = 10
End With
Next c
Next r
AddText sld, 60, 490, 840, 20, "Sources: 38 peer-reviewed references — see Reference Library tab in app.", 9, CLR_MUTED, False
AddFooter sld, 7
End Sub
' =========================================================================
' SLIDE 8 — System Map
' =========================================================================
Private Sub Slide_SystemMap(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "System Coverage", "13 body sites across 6 systems"
Dim systems As Variant
systems = Array( _
"Circulatory|Arterial & venous blood — the narrowest survival window", _
"Digestive|Stomach, small intestine, colon, saliva, bile, pancreatic", _
"Renal|Urine — the broadest physiologic range of any fluid", _
"Nervous|Cerebrospinal fluid — tracks systemic acid-base closely", _
"Reproductive|Vaginal, cervical mucus, uterine cavity, semen", _
"Integumentary|Skin surface — the protective acid mantle")
Dim i As Integer
For i = 0 To UBound(systems)
Dim parts() As String
parts = Split(systems(i), "|")
Dim y As Single
y = 130 + i * 58
AddBar sld, 60, y, 4, 42, CLR_TEAL
AddText sld, 80, y, 250, 24, parts(0), 13, CLR_DARK, True
AddText sld, 80, y + 24, 820, 20, parts(1), 10, CLR_MUTED, False
Next i
AddFooter sld, 8
End Sub
' =========================================================================
' SLIDE 9 — Checker Flow
' =========================================================================
Private Sub Slide_CheckerFlow(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "Interactive Checker", "From raw number to clinical context in 3 steps"
AddText sld, 60, 130, 840, 24, "HOW IT WORKS", 10, CLR_TEAL, True
Dim steps As Variant
steps = Array( _
"SELECT SITE|Choose from 13 body sites — blood, urine, skin, vaginal, semen, CSF, and more", _
"ENTER pH|Input a measured pH value (0-14 scale, two decimal places)", _
"GET CONTEXT|Instant placement on the spectrum, range validation, clinical checks, and pattern awareness — with a clear prompt to consult a clinician")
Dim i As Integer
For i = 0 To UBound(steps)
Dim parts() As String
parts = Split(steps(i), "|")
Dim x As Single
x = 60 + i * 300
AddBar sld, x, 170, 260, 4, CLR_ACCENT
AddText sld, x, 184, 260, 24, "STEP " & (i + 1), 10, CLR_TEAL, True
AddText sld, x, 210, 260, 28, parts(0), 14, CLR_DARK, True
AddText sld, x, 244, 260, 80, parts(1), 10, CLR_MUTED, False
Next i
AddText sld, 60, 360, 840, 24, "Each result includes:", 12, CLR_DARK, True
AddText sld, 60, 390, 840, 60, _
" - Placement on the universal spectrum with a visual marker" & vbCrLf & _
" - In-range / out-of-range validation with plain-language detail" & vbCrLf & _
" - Recommended clinical checks and disease-pattern awareness" & vbCrLf & _
" - Buffer-context notes with doctor discussion prompts and dietary guidance", _
10, CLR_MUTED, False
AddFooter sld, 9
End Sub
' =========================================================================
' SLIDE 10 — Market Positioning
' =========================================================================
Private Sub Slide_MarketPosition(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "Market Positioning", "Where pH Atlas fits"
AddText sld, 60, 130, 840, 24, "pH Atlas occupies the gap between clinical-grade references and consumer health tools:", 13, CLR_DARK, False
AddCard sld, 60, 180, 260, 180, "Clinical References", _
"Deep, accurate, peer-reviewed — but fragmented, technical, and inaccessible to non-specialists.", CLR_MUTED
AddCard sld, 340, 180, 260, 180, "pH Atlas", _
"Clinical-grade data, consolidated into one interactive, community-friendly interface. Accurate AND accessible.", CLR_TEAL
AddCard sld, 620, 180, 260, 180, "Consumer Health Apps", _
"Accessible and friendly — but often lack clinical rigor, sourcing, and the full-system picture.", CLR_MUTED
AddText sld, 60, 390, 840, 30, "Differentiator: clinical accuracy meets community accessibility.", 15, CLR_TEAL, True
AddBar sld, 60, 430, 120, 3, CLR_ACCENT
AddText sld, 60, 446, 840, 40, "Every range is sourced. Every explanation is plain-language. Every result points to a clinician.", 12, CLR_MUTED, False
AddFooter sld, 10
End Sub
' =========================================================================
' SLIDE 11 — Roadmap
' =========================================================================
Private Sub Slide_Roadmap(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "Roadmap", "Building toward a full clinical companion"
AddText sld, 60, 130, 840, 24, "ROADMAP", 10, CLR_TEAL, True
AddBar sld, 60, 175, 840, 2, RGB(203, 213, 225)
Dim phases As Variant
phases = Array( _
"PHASE 1|Now|Core Atlas|Reference panel, signals, checker, library — live and functional", _
"PHASE 2|Q1|Saved Readings|Track pH over time, export history, share with clinician", _
"PHASE 3|Q2|Mobile App|iOS/Android native build with offline reference access", _
"PHASE 4|Q3|Clinician Portal|Provider-facing dashboard with patient-shared readings and trend analysis")
Dim i As Integer
For i = 0 To UBound(phases)
Dim parts() As String
parts = Split(phases(i), "|")
Dim x As Single
x = 60 + i * 215
AddBar sld, x + 80, 165, 12, 12, CLR_TEAL
AddText sld, x, 190, 200, 20, parts(0), 9, CLR_TEAL, True
AddText sld, x, 210, 200, 20, parts(1), 11, CLR_DARK, True
AddText sld, x, 234, 200, 24, parts(2), 12, CLR_DARK, True
AddText sld, x, 260, 200, 80, parts(3), 9, CLR_MUTED, False
Next i
AddFooter sld, 11
End Sub
' =========================================================================
' SLIDE 12 — Next Steps
' =========================================================================
Private Sub Slide_NextSteps(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
AddTitleBar sld, "Next Steps", "Immediate actions to move forward"
AddCard sld, 60, 130, 840, 70, "1. Publish", _
"Deploy the current build to production and make it publicly accessible.", CLR_TEAL
AddCard sld, 60, 215, 840, 70, "2. Validate", _
"Engage 3-5 clinical reviewers to validate ranges and language against current guidelines.", CLR_TEAL
AddCard sld, 60, 300, 840, 70, "3. Gather Feedback", _
"Release to a pilot community of health-curious users and collect structured feedback.", CLR_TEAL
AddCard sld, 60, 385, 840, 70, "4. Iterate", _
"Prioritize saved-readings feature based on pilot feedback and clinician input.", CLR_TEAL
AddFooter sld, 12
End Sub
' =========================================================================
' SLIDE 13 — Thank You
' =========================================================================
Private Sub Slide_ThankYou(prs As Object)
Dim sld As Object
Set sld = NewSlide(prs, ppLayoutBlank)
sld.Background.Fill.ForeColor.RGB = CLR_TEAL
AddBar sld, 0, 0, 960, 540, CLR_TEAL
AddText sld, 200, 200, 560, 50, "pH Atlas", 48, CLR_WHITE, True, msoAlignCenter
AddText sld, 200, 260, 560, 30, "One spectrum. Every system. Plain language.", 16, CLR_ACCENT, False, msoAlignCenter
AddBar sld, 430, 310, 100, 2, CLR_ACCENT
AddText sld, 200, 330, 560, 30, "Thank you", 20, CLR_WHITE, False, msoAlignCenter
AddText sld, 200, 400, 560, 20, "Educational use only · Not a substitute for clinical advice", 10, CLR_ACCENT, False, msoAlignCenter
End Sub