Skip to Content
author's profile photo Former Member
Former Member

Create a Checkbox in a Word Document (OLE2)

Hi @all,

I want to create a WORD Document with ABAP. I created an OLE2 Object and now I want to generate a Checkbox in the WORD Document. My Syntax is the following:

DATA: o_word TYPE ole2_object.

  CREATE OBJECT o_word 'Word.Basic'.

  CALL METHOD OF o_word 'FileNew'
    EXPORTING
    #1 = 'normal.dot'.
         
  CALL METHOD OF o_word 'AppShow'.

  CALL METHOD OF o_word 'CHECKBOX'.

Now my Problem is, that the CheckBox doesn't appear and I really don't have any information about what Parameters the Method 'CHECKBOX' (Word.Basic) needs.

Can anyone help me to create a CheckBox in a WORD Document and further where I can get some information about what Parameters the Word.Basic Methods need.

Thanks a lot...

Christian

Message was edited by: Christian Kremer

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Oct 05, 2005 at 12:06 PM

    How do you insert a checkbox manually? You can record a macro in Word of the process of inserting the checkbox, then look at the VB code to figure out how to code it in ABAP.

    I can help you if you tell me how to create the checkbox manually.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      @ Rich:

      The Macro code to generate a CheckBox manually is:

          
      ActiveDocument.ToggleFormsDesign
          Selection.InlineShapes.AddOLEControl ClassType:="Forms.CheckBox.1"
      

      Can I also use Word.Application Objects instead of Word.Basic?

      Because the code I have posted here seems to be the syntax I must use with Word.Application

      Message was edited by: Christian Kremer

      Message was edited by: Christian Kremer

  • Posted on Oct 05, 2005 at 12:09 PM

    Hi,

    Check this link.

    parameters

    Kindly reward points by clicking the star on the left of reply if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2005 at 12:39 PM

    Hi Christian,

    Welcome to SDN world.

    below links might help you.

    http://help.sap.com/saphelp_erp2004/helpdata/en/59/ae3c98488f11d189490000e829fbbd/frameset.htm

    an easy reference for ole automation.

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c1d54348-0601-0010-3e98-bd2a2dcd9e6c

    reward points for helpfull answers and close the thread if your question is solved.

    regards,

    venu.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.