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

@ 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

Similar Messages

  • Creating Post Script File from Word Document

    Hi How to create a Ps File from Word document.. Is there any api to do this ?
    ~Arjun

    (1) It is
    PostScript, not
    Post Script or
    Ps!
    (2) To create PostScript from a Microsoft Word document, you simply open such a document in Microsoft Word and print to a PostScript printer driver instance, but chose the
    Print to file option. Note that since PostScript from drivers is device-dependent, you do need to choose a PostScript printer driver instance very carefully based on a PPD that has few device dependencies.
    - Dov

  • OLE - Creating header and footer in Word document using abap

    Hi All,
    I'm using OLE to create a WORD document from abap.
    I need to insert a logo in the header and a footer text.
    Does any one know how to insert a header/footer with abap ole ?
    I tried to insert the logo as picture with:
    call method of o_inlineshapes 'AddPicture' = o_logo
      exporting
      #1 = 'C:\logo3.jpg'.
    but I can't put it in the place I want..
    thanks,
    Michal

    call method of LOBJ_MS_WORD 'ActiveWindow' = w_activewindow.
    call method of lobj_activewindow 'ActivePane' = w_activepane.
    call method of lobj_activepane 'View' = w_activeview.
    SET PROPERTY OF w_activeview 'SeekView' = '9'.   " header view.
    " This will set the view to the header view. Whatever you write here
    will go to the header.
    Get PROPERTY OF lobj_ms_word 'Selection' = w_selection.
    CALL METHOD OF w_selection 'TypeText'exporting
      #1 = 'Rahul Anand'.
    "Now set the view again to the main doc view.
       SET PROPERTY OF w_activeview 'SeekView' = '0'.
    " Now write your main doc code .
    " For footer the view is '10'.
    call method of LOBJ_MS_WORD 'ActiveWindow' = w_activewindow.
    call method of lobj_activewindow 'ActivePane' = w_activepane.
    call method of lobj_activepane 'View' = w_activeview.
    SET PROPERTY OF w_activeview 'SeekView' = '9'.   " header view.
    " This will set the view to the header view. Whatever you write here
    will go to the header.
    Get PROPERTY OF lobj_ms_word 'Selection' = w_selection.
    CALL METHOD OF w_selection 'TypeText'exporting
      #1 = 'Rahul Anand'.
    "Now set the view again to the main doc view.
       SET PROPERTY OF w_activeview 'SeekView' = '0'.
    " Now write your main doc code .
    " For footer the view is '10'.

  • Can't create hyperlinks after converting a Word document with Acrobat XI Pro

    Hello,
    Here's my problem.
    I'm making a catalog document for my company.
    The document that I'm converting to PDF is made on Office Word 2013 and it's a .docx format file.
    I'm on Windows 8 and the latest version of Adobe Acrobat XI Pro installed.
    Inside my word document I have some pictures that have a hyperlink. Those hyperlinks directionate to a bookmark inside the word document. Inside the word document, if I do Ctrl+Click over the image, it will go to the page that has that bookmark. And it works. Period.
    Beside that I also have some Cross-references on the word document. Those cross-references basically are the page number from the bookmark reference. By accident on most of those cross-refrences I left enabled the "Insert as hyperlink" on the cross-reference box options. When I Ctrl+Click over those cross-references I also go into the page of that cross-reference.
    After I convert the word document into pdf, I can't get any hyperlink on the pictures, if I simply click on them, like if I click on a hyperlink on a webpage or something similar, the pdf won't go the the bookmark on the page that I've set on the word document.
    The funny thing is that if I click on the other cross-references I can go to the page were that cross-reference is...
    I tried all the methods to convert the file in order to obtain hyperlinks on the images...
    I tried to use the Acrobat tab and the File -> Save as Adobe PDF, as both uses Acrobat PDFMaker, but nothing works.
    Even tried all options on Acrobat PDFMaker but can't get it. "Create bookmarks", "Add links", "Convert Word Bookmarks", "...Word Styles to Bookmarks", "...Word Headings to Bookmarks", none works....
    If I try to simply print from inside Word by choosing the Adobe PDF printer (like if I choose a regular printer), in the printers options it doesn't show up any hyperlink/link/bookmark option related, so that way is definitely a no go...
    To reference, on 2006/2007 I also worked on a similar project and used this method on the word document (on Word 2003). At that time I had another Adobe Acrobat version, can't remember what version was...
    This hyperlink situation was without any problem. After conversion, on the pdf file, if I click on a image it went to the right place inside that pdf file...
    So I'm simply lost wether it's a problem of me, a problem of Word, a problem from Acrobat... simply lost...
    I'm desperated....please, someone help me!!!

    Ok, sorry for never talk since the last time, but I finally discovered why I had this problem.
    I found out that M$ decided somehow to change the process of embedded hyperlinks on a image, but in a docx it doesn't get affected. Only after transforming it into a pdf by Acrobat that the problem emerges...
    I found this site http://www.pb-solv.net/2013/08/embed-pictures-in-microsoft-word.html
    Basically all I have to do is "Use Insert, Quick Parts, Field, IncludePicture. This inserts the picture in the old way as a field. You can use Alt-F9 to reveal the field codes and change the images to be embedded rather than linked."
    Then, after converting it with acrobat, the pdf finally have hyperlinks on the images!!!
    They change this on Word 2007. As I had the 2003, at the time, I didn't had this problem.
    As I said, M$ changed something, but only is affected after converting with acrobat. So, acrobat also missed something in the process. I call it a 50/50 guilt.
    To bad no one ever notice this problem...

  • RH9 - Can not create ANY links in linked Word documents ;-(

    Ok, this does not make sense:
    - From RH9, create a fresh empty project
    - Create two word files "Topic1.docx" and "Topic2.docx"
    - Put "Link Here" in each document
    - Save the documents
    - From Project Manager, Project Files, link both documents, generate, update all, etc.
    - Now create hyperlinks in each topic, pointing to the other topic using default topic editor in RH9
    - Save All and Generate the WebHelp project and test the links are there and work.
    - Now open and edit both word documents in word. Add some text to each and save
    - In RH9 Project Manager, Project files, Update All and open the topics in RH9 default editor
    Walla, the full text is there, the LINKS are gone. Actually, I understand that this is how it works, but the BIG problem is that links to bookmarks, other topics, links to outside resources created in RH9 Default Editor cannot be preserved when the related/linked document is edited in Word. AND, you cannot create ANY of these links in the Word documents. So, you have a help system that has really nice update features when an author makes a change to a document, but NO LINKS. Updating a linked document will DELETE ANY changes made within the RH9 Default Editor.
    Does this make any sense? Has my brain fallen down? Is there another workflow option?
    Thanks for any help
    Lyle
    Hummmmm, NO POPUPs, mini TOCs or See Also Keywords, Link Controls, etc. etc. etc.

    I have been observing this thread and wanted to just chip in to remove some misnomers,
    1. If you create any hyperlink from any MS Word document (say Doc1) to another MS Word document (say Doc2) and you import the original document (Doc1) then it brings its reference (that is the word document Doc2) as baggage in the RoboHelp project and the hyperlink is not created to the html file generated for the word document Doc2 (linked or imported seprately).
         thus if you click the hyperlink in RoboHelp it should open the word document Doc 2 (that was brought into the project as baggage)
    2. If word "conversion setting" alone are modified (like the settings “convert references to hyperlinks”) then at times the mapping fails to work, in such scenarios just go to the conversion settings dialog of FrameMaker and modify multiple “other settings” (it won’t impact your word conversion mapping.) Now any conversion settings applied for word will work.
                Hence the “convert references to hyperlinks” is working but you need to update any FrameMaker conversion settings to get it working
    @ Lyle – as now the flow must be clearer so I would give you a suggestion to merge all the word documents that you want to work with and use cross-references to places you want to have hyperlinks and use the option to “convert references to hyperlinks” in RoboHelp.and keep all the authoring in word document so that nothing is lost on update.
    NB – There is a method to create intra document cross references in MS Word
    In FrameMaker the concept of book gives it a sense of collection and thus cross references across FM documents inside a book are converted easily but in Word there is no way to group word documents and thus it is not possible to convert any spatial hyperlinks from one document to another.
    Hope this helps
    Ashish

  • How do a create a workflow to highlight word documents?

    I have 100's of pages of word documents within a single folder all with part of them underlined as demonstrated. I need a way to avoid manually highlighting just the underlined sections and figured the automator is the best option to accomplish this. I dont know how to accomplish this though. Any instructions or suggestions would be greatly appreciated. Thanks

    I don't use Automator, but the following Applescript will do it:
    set excludedones to {"loginwindow", "Dock", "SystemUIServer", "MirrorAgent", "UniversalAccess", "iCalAlarmScheduler", "System Events"}
    tell application "Finder"
    set quitlist to the name of every application process whose file type is "APPL"
    end tell
    repeat with i from 1 to count of quitlist
    set aProcess to item i of quitlist
    if aProcess is not in excludedones then
    try
    tell application aProcess to quit
    end try
    end if
    end repeat
    tell application "Finder"
    shut down
    end tell
    Actually the last three lines by themselves would probably do it. Of course if any of the applications have open unsaved documents then you will get the usual dialog about do you want to save them.

  • Why can I not create pdf files from MS Word documents?

    I'm using Acrobat Pro XI (11.0.5), and Microsoft Word 2007:  I've noticed just recently that, whenever I try to create a pdf file - from within Microsoft Word - I get a message:  Word has stopped working"....  and then the word program crashes.   Then I get a message that says the adobe add-in isn't working and recommends that I disable it.   This is extremely frustrating!  I've tried going into Acrobat directly to create the pdf, to no avail.  I've tried utilizing the "Repair Acrobat Installation" and that doesn't seem to work either.
    The only thing I've noticed which might have caused this problem is I just recently updated Adobe Reader - is there some "conflict" going on between having these two Adobe products installed on the same Computer?

    See: Zanelli Multipage Importer
    http://indesignsecrets.com/zanelli-releases-multipageimporter-for-importing-both-pdf-and-i ndd-files.php/comment-page-1

  • Adobe crashes to desktop when I try to create a PDF from a Word document.

    The PDF does end up getting created, but not before crashing my Adobe to my desktop, or even crashing it to the background so I have to kill Adobe in the task manager in order to get it to start again.  The progress bar used to fill up faster when it was working correctly, but now, the progress bar just slowly fills up under "Reading PDF Document" and then freezes.
    I'm running Windows 7 Pro x64 on a Thinkpad T620.
    Please help!

    It's 9.4.
    We are having multiple issues crop up on this system.  Its MS Office and antivirus are both unstable, and a SQL server update has failed, so I am beginning to suspect that this issue may be a symptom of a bigger problem.

  • Not Creating a PDF from a Word Document

    Error log say "
    %%[ ProductName: Distiller ]%%
    Cambria not found, using Courier.
    %%[ Error: invalidfont; OffendingCommand: show ]%%
    Stack:
    %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    %%[ Warning: PostScript error. No PDF file produced. ] %%
    Cambria is good looking font. There would other fonts too ...

    Actually, there are two messages.
    First, it doesn't find Cambria. As it says, it will substitute Courier. This may not be what is wanted, but it isn't an error.
    Then, there is an invalidfont error. This could be unconnected, but most likely it means it cannot find Courier either and has to give up.
    Usual causes:
    1. messing with the Distiller font locations
    2. messing with fonts
    3. installing a font manager which messes with fonts.
    Font managers need careful setup to stop them touching required fonts.

  • Can't create Word Document report - need help

    Hi,
    I have been trying to create a report using a word document. I downloaded an example from ni.com that has Export_Info.vi. When I try to run it I get this error:
    Error 1003 occurred at Open VI Reference in New Report.vi->Export_Info.vi
    I traced the error back to New Report.vi which is a VI that comes with the LabView package. There is a Open VI reference that when it tries to open Word_Open.vi gives an error. So for some reason I can not open Word_Open.vi without an error, and it comes with the Report generation office library.
    Does anyone know what could the problem be?
    I tried reinstalling everything and i still keep getting the same error. This makes it impossible to create a report now.
    Any help would be VERY appreciated.
    Thank you

    Yes I have it installed. When I went to open up Word_Open.vi it opened with an error and it said that the property was not valid.
    I attached a screenshot of the block diagram for Wor_Open.vi with an error message.
    Thank you
    Attachments:
    word open.jpg ‏115 KB

  • Create PDF from a Word document within Acrobat

    Hi!
    I am having trouble to create a PDF from a Word document within Acrobat itself, and not by using PDF Maker in Word. When I try to create a PDF using Acrobat, it gives me the choice to choose any Office format file, but Word format doesn't appear. I can convert from an Excel document or a PowerPoint document, but not from a Word document, even if Word 2010 is installed and works perferctly. Why?
    I know I can make a PDF in Word itself by printing to the Adobe PDF printer or by using PDF Maker, but I want to resolve the issue in Acrobat that prevents me to select a Word document in the Create PDF dialog window. You can see the dialog box in the screenshot attached.
    Any help would be appreciated.
    I am using Acrobat X version 10.1.8 on Windows 7 Home Premium and I have Office 2010 installed (with Word 2010).

    Thanks for your reply. PDF Maker works in all of my Office applications. However, in Acrobat, the file formats available for me to create PDF from figure all the Office file formats except the one for Word. This is not normal. At my school, Acrobat X and Office 2007 are installed, and I can use there both PDF Maker in Word and creating PDF from Word document within Acrobat.
    So I think maybe there's a key in my Windows registry that is not set correctly? or something like that. I repaired the installation of Office 2010, and I did so for Acrobat X too, but it doesn't help. Any idea of how I can resolve that?

  • Create table in word document

    hi all,
    i create a word document through report.
    is it possible to create a table through abap code?
    thanks,
    dana.

    Hi MOKDEV,
    >>I want to create table of content for word document and i want to get the content of this from page header and then to build the table
    A collection of
    TableOfContents
    objects could represent the tables of contents in a document. When use Add method could add a tablecontent for a word document file. The below code provide a sample to create a tableConetent at the beginning of the document  from all the paragraphs
    styled as either Heading 1, Heading 2, or Heading 3
    Sub AddTableContent()
    Dim myrange As Range
    Set myrange = ActiveDocument.Range(Start:=0, End:=0)
    ActiveDocument.TablesOfContents.Add Range:=myrange, _
     UseFields:=False, UseHeadingStyles:=True, _
     LowerHeadingLevel:=3, _
     UpperHeadingLevel:=1
    End Sub
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Desktop office integration : Creating and filling tables in a word document

    Hi all,
    I want to create a table in a word document and then fill it with data. The word processor interface has only 'insert_table' methods which can download the data in an ABAP internal table to an already
    existing table in a word document, but in my case I also want to create the word table,  titles etc. in the word document. Has someone experience with such kind of a requirement or have someone an example for it? 
    Kind Regards,
    Sükrü

    Hi,
    May this one will help you.
    CREATE OBJECT wordapp 'Word.Application'.
    CALL METHOD OF wordapp 'Documents' = documents.
    CALL METHOD OF documents 'Add' = thisdoc.
    CALL METHOD OF thisdoc 'Activate'.
    GET PROPERTY OF wordapp 'Selection' = selection.
    SET PROPERTY OF wordapp 'Visible' = 1.
    CALL METHOD OF selection 'TypeParagraph'.
    CALL METHOD OF selection 'TypeText'
      EXPORTING #1 = 'New Document'.
    GET PROPERTY OF wordapp 'Tables' = tables.
    CALL METHOD OF tables 'Add' = thistable.
    SET PROPERTY OF thistable 'NumRows' = 2.
    SET PROPERTY OF thistable 'NumColumns' = 2.
    or you can check
    CALL METHOD OF wordobj 'TABLEINSERTTABLE'
    EXPORTING
    #01 = 2
    #02 = 3.
    aRs

  • SAP OLE - Create Hyperling on a Word Document

    Hi,
    My next step of creating a word document using OLE is to define some hyperlinks on a document. I have ran a macro in word to 'see what it does' when manually creating a hyperlink. Below is the macro: -
        ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:="", _
            SubAddress:="_Program_Z_OPEN_HRS_UPD_WRF1", ScreenTip:="", TextToDisplay _
            :="This is the program"
    I have tried to implement this using ABAP with no success. Maybe because I still dont fully understand how to interprete these marcos as ABAP.
    Has anybody created a hyperlink on a word document before, if so, seeing the code would be a great help.
    Thanks
    Martin
    Edited by: Martin Shinks on Dec 21, 2011 9:52 AM

    Never mind, with a bit of jiggery pokery, I fixed it myself.

  • Create link to Microsoft Word document

    Hi All!
    I'm using Frame 7.2 and WebWorks just so you know that my file is being converted to html.
    I am trying to create a link to a Word document, that shows a Word icon (not the title of the document) with a pop-up (mouseover) that describes the "action" (something like: to open the worksheet, click here.)
    Any ideas?
    Cindy

    Hello CindyLL,
    You might try the following (assuming that you use WebWorks 2003)
    1. Use a special paragraph format in FM for paragraphs that contain such a link (e.g. "Link_PDF")
    2. In WWP2003 map a special WebWorks Format to this FM Format
    3. In the macro tab of this FM format add html code that
    * displays a word icon
    * and give it an alt-text that says "Click the link" or whatever
    Hope this helps,
    Franz.
    [SYSTEC - the document processing company.]
    [excessive signature deleted by host]

Maybe you are looking for