Are you saying, you have a jpeg showing text which you want to read and then save as a word file? If so, that's going to take some heavy coding. Text recognition is a very complex task. You may want to look into neural networks, to allow it to learn itself, but as I said, it's a big task.
Or do you simply want to save a jpeg as a picture in a Word file? If so, looking at
Apache POI is probably the right way to go.
Greetings,
Nepomuk