2011 Dec 12 1:18 PM
Hi ,
I am creating a word document using OLE. Is it possible to specify the paragraph style when putting text onto the document.
For example I would like to specify the styles Heading 1, Heading 2, Heading 3 etc.
If this is possible is it also possible to auto generate the cross-reference on the document so that it displays the index at the top of the document.
Thanks
Martin
Hi ,
I am creating a word document using OLE. Is it possible to specify the paragraph style when putting text onto the document.
For example I would like to specify the styles Heading 1, Heading 2, Heading 3 etc.
If this is possible is it also possible to auto generate the cross-reference on the document so that it displays the index at the top of the document.
Thanks
Martin
2011 Dec 12 1:30 PM
Hi,
Please refer this example for paragraph formatting.
http://sapabap-techsupport.blogspot.com/2010/09/calling-word-documents-from-abap.html
*--Setting paragraph format attribute - section
Regards,
2011 Dec 12 1:41 PM
Hi,
This is telling me about Bold, Italics, Underline etc.
I want to set some text with a paragraph style, so that it can be used on an index.
Thanks
Martin
2012 Dec 12 12:23 PM
You may use the parameters of the font to design your document. But if you need an table of content, that will not be enough. In this case you can use the following paragraph functions:
GET PROPERTY OF gs_application 'Selection' = gs_selection .
GET PROPERTY OF gs_selection 'ParagraphFormat' = gs_parformat .
SET PROPERTY OF gs_parformat 'Style' = -2. "value -2 equals style wdStyleHeading1
Hope this helps.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |