Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding catching the Ms-word styles in the form of HTML

Former Member
0 Kudos

HI,

I have created a program which is used for storing the data in a custom table. I have given to the user to edit the value available in the database with the help of ms-office. I need a help how to catch the styles like BOLD , italic, underline.... etc...can u plz give me a method or Class which is used to capture the user input values in the same style in the form of HTML.

Thanks and regards,

Naresh

1 REPLY 1

Sandra_Rossi
Active Contributor
0 Kudos

That would be a rather complex VBA macro or OLE2 calls if you use OLE2 to connect MS Word to SAP.

Why don't you use a simple SAP editor, like the one used to edit long texts? (EDIT_TEXT function module, see RSTXTCAT as a simple example program). There is bold, italic, etc., and you get data like the following (if you use B, I, U character formats for bold, italic, underline respectively):


<B>bold&lt;/> <I>italic&lt;/> <U>underline&lt;/>

You can convert them easily and cleanly into HTML using CONVERT_ITF_TO_HTML for example.