<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic OLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole/m-p/945634#M64104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having two questions in the following code snippet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object gs_word 'Word.Basic'.&lt;/P&gt;&lt;P&gt;call method of gs_word 'Filenew'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = 'normal.dot'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.I want to know how we can identify the value to be passed for each exporting parameter(here 'normal.dot').I searched in tables TOLE and OLELOAD.But I am unable to find information about the parameter values.&lt;/P&gt;&lt;P&gt;2.If I want to add a table in word,how the code should be using 'WORD.BASIC'.[I need code only using 'WORD.BASIC']&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any useful pointers will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;J.Jayanthi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Aug 2005 08:53:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-08-10T08:53:05Z</dc:date>
    <item>
      <title>OLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole/m-p/945634#M64104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having two questions in the following code snippet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object gs_word 'Word.Basic'.&lt;/P&gt;&lt;P&gt;call method of gs_word 'Filenew'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = 'normal.dot'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.I want to know how we can identify the value to be passed for each exporting parameter(here 'normal.dot').I searched in tables TOLE and OLELOAD.But I am unable to find information about the parameter values.&lt;/P&gt;&lt;P&gt;2.If I want to add a table in word,how the code should be using 'WORD.BASIC'.[I need code only using 'WORD.BASIC']&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any useful pointers will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;J.Jayanthi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2005 08:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole/m-p/945634#M64104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-10T08:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: OLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ole/m-p/945635#M64105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jayanthi,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT YOLE .

* This program stores or gets pictures and texts in/from SAP.
* If key has an initial value, it will store the picture and text in
* an SAP cluster.
* If key has no initial value it calls MsWord via OLE2 and displays
* the picture and the text.

TABLES : INDX.
INCLUDE OLE2INCL.
DATA: WRD TYPE OLE2_OBJECT,
      REC TYPE OLE2_OBJECT,
      PIC TYPE OLE2_OBJECT.
DATA: BEGIN OF ITAB1 OCCURS 20,
    LINE(1022) TYPE X,
END OF ITAB1.
DATA: BEGIN OF IREC OCCURS 1,
    LINE(1022) TYPE X,
END OF IREC.
DATA: BEGIN OF ITAB2 OCCURS 20,
    LINE(100),
END OF ITAB2.
*data: key like indx-srtfd value 'JJJ'.
DATA: KEY LIKE INDX-SRTFD.
DATA: MODE, SIZE TYPE I, TIM LIKE SY-UZEIT.

IF KEY &amp;lt;&amp;gt; ' '.             "Import the picture and text to SAP
  CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
            FILENAME = 'c:inputbubbles.bmp'
            FILETYPE = 'BIN'
       TABLES
            DATA_TAB = ITAB1.

  CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
            FILENAME = 'c:inputtext.txt'
            FILETYPE = 'ASC'
       TABLES
            DATA_TAB = ITAB2.

  EXPORT ITAB1 ITAB2 TO DATABASE INDX(ST) ID KEY.

ELSE.                                  "Display the picture and text
  KEY = 'JJJ'.
  IMPORT ITAB1 ITAB2 FROM DATABASE INDX(ST) ID KEY.
  MODE = ''.
  LOOP AT ITAB1.
    CLEAR IREC.REFRESH IREC.
    IREC = ITAB1.
    APPEND IREC.

    CALL FUNCTION 'WS_DOWNLOAD'
         EXPORTING
              BIN_FILESIZE = 1022
              FILENAME     = 'c:inputbub2.bmp'
              FILETYPE     = 'BIN'
              MODE         = MODE
         TABLES
              DATA_TAB     = IREC.
    MODE = 'A'.
  ENDLOOP.

  CALL FUNCTION 'WS_DOWNLOAD'
       EXPORTING
            FILENAME = 'c:inputtxt.txt'
       TABLES
            DATA_TAB = ITAB2.

 CREATE OBJECT WRD 'WORD.BASIC'.
 CALL METHOD OF WRD 'FILEOPEN' = REC EXPORTING #1 = 'C:inputtext.txt'.
 CALL METHOD OF WRD 'INSERTPICTURE' = PIC
             EXPORTING #1 = 'C:inputbub2.bmp'.
ENDIF.

AT LINE-SELECTION.
  FREE OBJECT PIC.
  FREE OBJECT REC.
  FREE OBJECT WRD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this if u can get some info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2005 12:02:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ole/m-p/945635#M64105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-10T12:02:33Z</dc:date>
    </item>
  </channel>
</rss>

