How to select a bookmark in Word from abap?

Hi,
We are looking for a way to select a specific bookmark from a Word document (opened before from abap, using methods of class I_OI_DOCUMENT_PROXY). The bookmark needs to be replaced by a specific value.
We tried call method 'execute macro' .... with par1 = '-1' and parm4 = 'GoTo'. The retcode is OK, but nothing happens. Any ideas what we are missing here?
Regards,
Hans van der Kooij

Thanks Jayanthi,
We had already read the article, but did not interpret it correctly. We found the solution in an SAP OSS note.
We had to use method get_document_handle to get an OLE link and continue from there with OLE. The article however is very brief on that part and has no example.
So for anyone who would like to do the same or simular:
- call method do_document->get_document_handle:
    EXPORTING
       no_flush = ''
    IMPORTING
       error = do_error
       handle = do_handle
       retcode = do_retcode.
- GET PROPERTY OF do_handle-obj 'Application' = do_ole_application.

Similar Messages

  • How to read particular number or word from lengthy serial data

    Serially getting lengthy data...how to get particular number or word from Tht

    Omi_30 wrote:
    I am getting continusly 3 measured voltages,currentso,powers over serial..those values over serial are separated by spaces
    Are the numbers in ASCII?  Use the Spreadsheet String to Array function.  Wire in a space constant to the delimiter and a 1D array of doubles to the array type.  You can then use Index Array to get the value you want.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Creating Macros in MS word from ABAP

    How to create a macro in MS word from ABAP code.I want to generate tables dynamically in Word using Macro from the data generated by the code.
    Regards,
    Sinu.

    Hi Mathew
    Better is create a macro in MS Word and calling the macreo frol ABAP.
    Check my macros below.
    1. A macro to create a table
    Public Function CreateTables(Rows As Integer, Cols As Integer, Width1 As Double, _
                                 Width2 As Double, Width3 As Double, Width4 As Double, _
                                 Width5 As Double, Width6 As Double, Width7 As Double)
    ' CreateTables Macro
    ' Macro created 2007-06-11 by WINUEL SA
        Dim oRange As Word.Range
        Dim oTable As Word.Table
        Set oRange = ActiveDocument.Bookmarks("bmT01").Range
    '   Add table to range of bookmark (oRange)
        Set oTable = ActiveDocument.Tables.Add(Range:=oRange, _
        NumRows:=Rows, _
        NumColumns:=Cols, _
        AutoFitBehavior:=wdAutoFitFixed)
        ActiveDocument.Tables(1).Columns(1).Width = CentimetersToPoints(Width1)
        ActiveDocument.Tables(1).Columns(2).Width = CentimetersToPoints(Width2)
        ActiveDocument.Tables(1).Columns(3).Width = CentimetersToPoints(Width3)
        ActiveDocument.Tables(1).Columns(4).Width = CentimetersToPoints(Width4)
        ActiveDocument.Tables(1).Columns(5).Width = CentimetersToPoints(Width5)
        ActiveDocument.Tables(1).Columns(6).Width = CentimetersToPoints(Width6)
        ActiveDocument.Tables(1).Columns(7).Width = CentimetersToPoints(Width7)
    End Function
    2. A macro to fill table
    Public Function FillTabRowNo2(RowNo As Integer, S1 As String, S2 As String, S3 As String, _
                                 S4 As String, S5 As String, S6 As String)
        ActiveDocument.Tables.Item(1).Cell(RowNo, 1).Range.Text = RowNo
        ActiveDocument.Tables.Item(1).Cell(RowNo, 1).Range.Paragraphs.Alignment = Alig2
        ActiveDocument.Tables.Item(1).Cell(RowNo, 2).Range.Text = S1
        ActiveDocument.Tables.Item(1).Cell(RowNo, 3).Range.Text = S2
        ActiveDocument.Tables.Item(1).Cell(RowNo, 4).Range.Text = S3
        ActiveDocument.Tables.Item(1).Cell(RowNo, 5).Range.Text = S4
        ActiveDocument.Tables.Item(1).Cell(RowNo, 5).Range.Paragraphs.Alignment = 2
        ActiveDocument.Tables.Item(1).Cell(RowNo, 6).Range.Text = S5
        ActiveDocument.Tables.Item(1).Cell(RowNo, 6).Range.Paragraphs.Alignment = 2
        ActiveDocument.Tables.Item(1).Cell(RowNo, 7).Range.Text = S6
        ActiveDocument.Tables.Item(1).Cell(RowNo, 7).Range.Paragraphs.Alignment = 2
    End Function
    best regards
    John

  • How do I retrieve bookmarks and passwords from a Windows backup, after OS re-install?I have a full Windows backup of my machine, pre re-installl

    I had to reinstall Vista 7 OS. I have a full Windows backup of my machine, prior to the re-installation. How do I retrieve the bookmarks and passwords from the backup? I understand they're stored in various files a ".default" folder in C:\users\username\appdata\roaming\mozilla\firefox\profiles. When I try restoring the folder, the files get skipped... When I try browsing for the individual files, I don't see them!

    Many thanks for your responses... After a little scouting on the web, I have found THE solution... This is all due to the way Windows 7 Backup works, and will NOT let restore apps...
    ("File restore in Windows7 is not designed to restore back applications. This is because the application state is spread across potentially multiple folders, files & registry. Windows7 file backup is not aware of where all the state is spread to be able to restore the entire application accurately as such information is internal to the application. Restoring application partially might corrupt the application and render the application unusable. So we do not allow restoring applications from file backup.
    In case files under C:\Program Files etc. are chosen for restoring, we block restoring files from backup to such locations as it might cause the applications to not function.'')
    What one has to do when restoring is to NOT attempt to restore to the original location, but to select the radio button which allows you to type a path where you want the files restored and type in the path of the original location!!! Then select copy and replace...A little quirky (and tedious), but it works!

  • How to select multiple pages to export from one document to another

    Have a 200 + page doc, would like to select about half to place in another doc.
    An earlier post advised selecting the required pages in thumbnail view and copy and paste into second doc. No problem with single page that way but how to select the multiple pages.
    Would appreciate some guidance please.
    Am using Pages Maverick.

    Thanks fruhulda.
    This is what I found,
    make a section around the consective pages to be copied,
    in thumbnail view, hold down shift key, right click on first page in section of interest, select copy,
    in thumbnail view of second document, right click and select paste.
    transfer complete.
    Found clicking in body of second document, ie not the thumbnail view, paste will only transfer text and not images.
    I do have difficulty in splitting sections - will search forum

  • How to read each and every word from a string.

    Hi all,
       I have a string which is having many label numbers. if the string is lv_str, its value is like, 11111111111111##22222222222222##3333333333333.
    I need to move the values alone into internal table. each value should be updated as a single row into one internal table. How to read each and every word of the string and move to an internal table.
    the internal table should be like this.
    11111111111111
    22222222222222
    3333333333333
    Can any one give me a suggestion in this regard.
    POINTS PROMISED.
    Regards,
    Buvana

    Hi,
    If you know the format and length of the data
    Use split at '#' so that you will get the individual values.
    Thean append it to internal table.
    Reward iof helpful.

  • How do i remove a stadard word from a spell check dictionary?

    even thought its a real word and spelled correctly i want to be highlighted if i type it.
    I'm using the standard English(united states) dictionary.
    i also have low technical skill.
    i meant to type "dog" but i actually typed "dong" and it lead to some embarrassment , i want it to remove it as a standard word from my spellchecker , Ive got a few I'm thinking of removing , as a just in case kind of thing.
    Thanks guys

    Yes, editing that file works. Because the line breaks are not traditional DOS line breaks, you should not use Notepad as your editor. Instead, try this:
    (1) With Firefox closed, open the Start menu to All Programs > Accessories
    (2) Right-click Wordpad and choose Run as Administrator, give yourself permission when prompted by Windows
    (3) Navigate Wordpad's Open dialog to C:\Program Files (x86)\Mozilla Firefox\dictionaries and change the file type to all files (or type *.* in the box and press Enter) so you can open en-US.dict
    (4) Search in the page (Ctrl+f) for dong/ (it's not the first one) then add XYZ between dong and /
    ''The reason for this is so you can easily find and undo your changes by searching for XYZ/ or globally replacing that back to / if needed.''
    (5) Save and then restart Firefox. If spellcheck seems to work correctly, you can close Wordpad. If not, you might want to undo your changes in Wordpad (you might or might not be able to save that with Firefox open).

  • How to initiate a RFC fuction module from ABAP and push data to Java prgm

    I want to push the data from ABAP program to a java program, the RFC connection has to be initiated from ABAP. How can i do this.
    Kindly help me with a example program if possible.
    Thanks in advance.
    Sounder.

    Hi,
    If you are using JCo connector for the interface, then please look into this link
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    aRs

  • How do I migrate bookmarks and passwords from Ubuntu to OS X.

    My Ubuntu computer still boots but its hard disk may be dying. I want to migrate my profile settings from Ubuntu to OS X on my Mac. I copied my Ubuntu profile folder onto a thumb drive. Everything seemed to copy fine except for one symbolic link. I tried to copy the contents over the contents of the Apple Mac's profile folder, but it seems to have had no effect.

    When you run Firefox on your Mac, a Firefox profile folder is created with default data and settings. You have to remove the '''contents''' of the new Firefox profile folder on your Mac (e.g., the bookmarkbackups folder, places.sqlite , cookies.sqlite, etc.) and then copy over the '''contents''' of your old Firefox [[Profiles|profile folder]] to the Mac profile folder. You should do this selectively, just copying important files (like places.sqlite for bookmarks and browsing history). [[Recovering important data from an old profile]] lists important files and explains how to transfer the data to the new profile on your Mac. [[Backing up your information]] explains where the old profile data is stored and how to save a copy.
    These articles may also help:
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Moving_your_profile_folder

  • I would like to know how to selectively merge bookmarks on two machines on the same network please

    Over time, my desktop and notebook computer bookmarks have diverged. I would like to be able to merge them so they are both the same again, choosing entries from each machine as appropriate. With IE I used to use a directory/file comparison tool, but I undertand FF uses a database and haven't found out how to do it.
    Rgds, Andy

    See [[What is Firefox Sync]] and [[How to sync Firefox settings between computers ]]

  • How to Selectively Delete ONE Key Figure from Cube....

    Hi:
    On a Daily basis (Via Process Chain), I need to do the following:
    1.  DELETE Single Key Figure from my planning cube.  When the "PYMNT DATE" is greater than System Date, then delete the
         key Figure.
    2.  Once Deleted, LOAD the same Single Key Figure from another cube when the PYMNT DATE is GT  System Date. 
    How can I do this in a Program.  What would be the code for this?  Need help with ABAP.
    Thanks in advance.....  PBSW

    Hi,
    See Article on Selective Deltaion in
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    Using Selective Deletion in Process Chains
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/s-u/using%20selective%20deletion%20in%20process%20chains.pdf
    Thanks
    Reddy

  • How do I import bookmarks and passwords from Google on Android phone?

    Just downloaded Firefox and need bookmarks etc from Google before j set default browser

    Please try these instructions :
    # Open Firefox
    # Press menu button
    # Select settings from the menu
    # Select Customize
    # Select Import from Android

  • How do I import Bookmarks into Firefox from another hard disk that has Firefox installed on it but is no longer the primary disk?

    I was running firefox on a desktop. The hard drive became unusable as the primary drive, either due to a software installation that left the operating system unstable or malware or both. The hard drive has been cleaned of malware, but was replaced by a new hard drive which has a new installation of firefox. Operating was and is Windows XP. The old hard drive which is now F:\ is still in the computer. There are many, many bookmarks on F;\ ...Firefox that I need to import the Firefox on C:\. I believe they are the .json files. Can I copy and paste, or import the bookmarks?

    See:
    *https://support.mozilla.org/kb/Recovering+important+data+from+an+old+profile
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    *http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox

  • How to get the list of words from the dictionary?

    Hello,
    Please confirm the possibility to get the list of words available from the InDesign's default dictionary for example: I'd like to have all the words available from the 'Russian' dictionary from InDesign.
    Thanks,
    Praveen

    This should help:
    http://helpx.adobe.com/indesign/kb/add_cs_dictionaries.html
    when you find the file "AdobeHunspellPlugin.bundle", copy it to your desktop, change the extension to .zip and extract the contents. The Russian dictionary should be in the ru_RU folder (ru_RU.dic)

  • How do I import bookmarks and passwords from Safari?

    I was going to be cynical, but I decided that you might not get the message, so I will be direct: is anyone out there???? Is anyone from Mozilla going to answer my question in this century?????

    Please try these instructions :
    # Open Firefox
    # Press menu button
    # Select settings from the menu
    # Select Customize
    # Select Import from Android

Maybe you are looking for

  • WEB u2013 I cache issue.

    We have BO XI 3.1 PF 1.7 and SAP BW 7.0 SP 18 We are facing strong caching issue  with WEB- I XI 3.1 , what we observed is it cache previously fetched data and does not recognize data been updated in BW Infoprovider ( in our case we have BEx query on

  • Transaction approach

    for transaction what is the recommended approach? Container-Managed or Bean-Managed? In my case I dont have any Entity beans. What about JTA? Thanks

  • Find the Number range

    Hi all; Can any one help me on this issue !! How to find the Number Range for Customer / Venodor. we have already assign the Number range and how to find the next availabilty number. I .e   I need the next  Availability  number for  Customer/ Vendor

  • Entire website in Flex? Performance?

    This is sort of in conjunction with my other post, but we are deciding whether to have an entire website built in flex, with no HTML. The site is roughly 30 pages and includes everything from simple text to photo galleries. The photo galleries would

  • G/L account name query

    Hi All I need a query to get a GL account name when a user selects a GL Account with an invoice service type. Regards Bongani