Untitled
Anonymous
plain_text
06/22/2024 7:33 AM
932 B
15
Indexable
Sub CreateAudiogramChart()
Dim doc As Document
Set doc = ActiveDocument
' Create a table with 13 rows and 9 columns
Dim tbl As Table
Set tbl = doc.Tables.Add(Range:=Selection.Range, NumRows:=13, NumColumns:=9)
' Set the width for columns
Dim i As Integer
For i = 1 To 9
tbl.Columns(i).Width = InchesToPoints(0.75)
Next i
' Merge cells for the labels
tbl.Cell(1, 1).Merge MergeTo:=tbl.Cell(1, 8)
tbl.Cell(1, 1).Range.Text = "Hearing Level (dB)"
tbl.Cell(13, 1).Merge MergeTo:=tbl.Cell(13, 8)
tbl.Cell(13, 1).Range.Text = "Frequency (Hz)"
' Insert frequency labels
tbl.Cell(13,
Editor is loading...
Leave a Comment