How does the Order of Scribes feature Awakened Spellbook work with multiple damage types?

Awakened Spellbook, a level 3 Order of Scribes feature, says the following:

When you cast a wizard spell with a spell slot, you can temporarily replace its damage type with a type that appears in another spell in your spellbook, which magically alters the spell’s formula for this casting only. The latter spell must be of the same level as the spell slot you expend.

If I cast a spell that deals multiple damage types, for example Ice Knife (, how does this work? Could I change both damage types to a different type (for example force damage on initial hit, fire damage on burst) or only the same damage (force damage on both damage rolls). Also, could I switch the two damage types inside the spell, having cold damage on initial hit, and piercing damage on the burst?