Problem solve Get help with specific problems with your technologies, process and projects.

Retrieving bookmarks (from a word document) into ABAP program

The following example ABAP code shows, how to retrieve data from a bookmark in a word document into an internal table.

The following example ABAP code shows, how to retrieve data from a bookmark in a word document into an internal...

table (block). This shows one of the way to integrate MS word documents to ABAP programs, without using any third party products.


data: empty.
data: begin of block occurs 100,
line(72),
end of block.

create object wordobj 'Word.Basic'.   

call method of wordobj 'AppShow'. "optional

path_and_file = 'C:sample.doc'.

call method of wordobj 'FileOpen' exporting
 #01 = path_and_file
 #02 = 0.

call method of wordobj  'EditGoto' exporting
#01 = 'Bookmark01'.

call method of wordobj  'EditCopy'. 


call function 'CLPB_IMPORT'
importing
 empty      = empty
tables
 data_tab   = block
 exceptions
 clpb_error = 01.

call method of wordobj  'CopyBookmark'.
This was last published in March 2002

Dig Deeper on SAP ABAP

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchHRSoftware

Close