I use this macro as a token action for my spellcasters, it works for PC's and NPC's, but it takes a bit of fiddling for each caster, so ymmv. This particular block is for the is for the Mage NPC. You will need to add and remove spell slots individually for different casters so it's not great for completely on the fly, but with a few minutes time you can make it work for any caster.
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:8.0pt;
mso-para-margin-left:0in;
line-height:107%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
/w "@{selected|character_name}"
&{template:atk} [[ {{desc=***@{selected|character_name} Spells***
__________________________
Spell Save **DC** [[@{spell_save_dc}]],
Spell attacks +[[@{spell_attack_bonus}]]
__________________________
**Cantrips**
[@{Selected|repeating_spell-cantrip_$0_spellname}](~Selected|repeating_spell-cantrip_$0_spell)
|
[@{Selected|repeating_spell-cantrip_$1_spellname}](~Selected|repeating_spell-cantrip_$1_spell)
| [@{Selected|repeating_spell-cantrip_$2_spellname}](~Selected|repeating_spell-cantrip_$2_spell)
|
[@{Selected|repeating_spell-cantrip_$3_spellname}](~Selected|repeating_spell-cantrip_$3_spell)
** 1st Level
(@{selected|lvl1_slots_expended}/@{selected|lvl1_slots_total}) spell
slots**
[@{Selected|repeating_spell-1_$0_spellname}](~Selected|repeating_spell-1_$0_spell)
|
[@{Selected|repeating_spell-1_$1_spellname}](~Selected|repeating_spell-1_$1_spell)
|
[@{Selected|repeating_spell-1_$2_spellname}](~Selected|repeating_spell-1_$2_spell)
| [@{Selected|repeating_spell-1_$3_spellname}](~Selected|repeating_spell-1_$3_spell)
**2nd Level
(@{selected|lvl2_slots_expended}/@{selected|lvl2_slots_total}) spell
slots**
[@{Selected|repeating_spell-2_$0_spellname}](~Selected|repeating_spell-2_$0_spell)
|
[@{Selected|repeating_spell-2_$1_spellname}](~Selected|repeating_spell-2_$1_spell)
**3rd Level (@{selected|lvl3_slots_expended}/@{selected|lvl3_slots_total})
spell slots**
[@{Selected|repeating_spell-3_$0_spellname}](~Selected|repeating_spell-3_$0_spell)
| [@{Selected|repeating_spell-3_$1_spellname}](~Selected|repeating_spell-3_$1_spell)
| [@{Selected|repeating_spell-3_$2_spellname}](~Selected|repeating_spell-3_$2_spell)
**4th Level (@{selected|lvl4_slots_expended}/@{selected|lvl4_slots_total})
spell slots**
[@{Selected|repeating_spell-4_$0_spellname}](~Selected|repeating_spell-4_$0_spell)
|
[@{Selected|repeating_spell-4_$1_spellname}](~Selected|repeating_spell-4_$1_spell)
**5th Level (@{selected|lvl5_slots_expended}/@{selected|lvl5_slots_total})
spell slots**
[@{Selected|repeating_spell-5_$0_spellname}](~Selected|repeating_spell-5_$0_spell)
}}
As needed change the spell level "spell-#" , cantrips are "spell-cantrip" and the spell number for each where the first spell is $0.