Is there any study on the effectiveness of taking notes in a lecture vs taking notes on written materials?
The primary value of taking notes by hand is not the record that you create, but that the act of taking notes causes your brain to engage more deeply with the material.  You might never look at your notes again, but taking them has a strong positive effect on your ability to understand and remember the material that you are taking the notes about.

As such, you could potentially get similar value not by copying but by summarizing a text by hand.  Taking notes in lecture gives at least one additional benefit: it provides a focused block of time in which distractions are less available to you.  With a good lecturer, you get a second benefit: a lecturer is often much better than a text at directing your attention to the most important concepts in material.