Can I say "By the way" in an official document or professional meeting and other important/formal times?
I never saw any film which would include these words.
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.Sign up to join this community
The phrase by the way is not especially informal, and you may freely use it in formal situations. However, if you wish to use a variant which is more formal, then you could use a substitute such as:
Or one of the phrases mentioned in Rimmer's answer.
You can, but it definitely sounds informal. A better way of going about it would be to write the incidental information into the work itself, rather than making it incidental.
Though, if you must go into a tangent, there are transitions that you can pull off without making it seem tangental to the original point. You can use the term "relevantly" if the topic is related and pertinent to the original point you are discussing. Or, if you're offering it as evidence, you can simply say "as evidence", or otherwise indicate the reason you are including this extra information.
Regardless of what phrase you choose to use, it would be a good idea to indicate why you are including the information in the first place, even in just these brief ways. Better to make the viewer think you are expanding your point, rather than drawing away from it to talk about something else.