The second generation Apple Pencil only works with the 3rd generation iPad Pro (and later) as it requires an iPad with an integral magnetic charging dock. If your iPad Pro is 2nd generation, then only the 1st generation Pencil is compatible. If you charge your Pencil via the Lightning port, it's first generation. If your iPad Pro has a charging dock, it's 3rd (or later), and your Pencil is 2nd generation.
The reason it doesn't work is because Office 365 doesn't support convert to text. This is a MS issue, nothing to do with Apple.
I have both and I hardly ever use my 1st generation Pencil as it's so inconvenient to charge. I have a 4th generation 12.9" and I couldn't be without my 2nd gen Pencil. I also prefer the shape of the second generation as the slightly flattened charging edge makes it far more comfortable to use for long periods. I find cylindrical writing utensils extremely uncomfortable.