OLE object using MS Word -- Unprotect/Protect document

Hi.
I'm on ECC6.0. I need a functionality to open a Word file (.rtf / .doc) on user's temp folder, unprotect it (like using Word's Tools -> Unprotect Document because, by default, the doc is protected w/o a password) to be able to protect it with a password, and then save it. I tried the following code but it's not working as I expected for the requirement:
TYPE-POOLS: ole2.
DATA:
lo_word TYPE ole2_object,
lo_worddocs TYPE ole2_object,
lo_worddoc TYPE ole2_object.
        CREATE OBJECT lo_word 'WORD.Application'.
        GET PROPERTY OF lo_word 'Documents' = lo_worddocs.
        CALL METHOD OF lo_worddocs 'OPEN'
          EXPORTING
          #1 = lv_file_source.
        GET PROPERTY OF lo_word 'ActiveDocument' = lo_worddoc.
        CALL METHOD OF lo_worddoc 'UNPROTECT'.
        CALL METHOD OF lo_worddoc 'PROTECT'
          EXPORTING #1 = 'password'.
        CALL METHOD OF lo_worddocs 'SAVE'.
        CALL METHOD OF lo_worddocs 'CLOSE'.
In tcode SOLE, I found two relevant entries:
OLE application      WORD.BASIC
Version number       6
CLSID                {000209FE-0000-0000-C000-000000000046}
CLSID LibType        {000209FE-0000-0000-C000-000000000046}
OLE object name      WORDBASIC
Type Info key        NO_TYPELIB
Include program
Language             EN
Check authorization
Text Microsoft Word 6.0 Wordbasic
OLE application      WORD97
Version number
CLSID                {000209FF-0000-0000-C000-000000000046}
CLSID LibType
OLE object name
Type Info key        NO_TYPELIB
Include program
Language
Check authorization
Text
Pls help me to the right track.
Thanks.

Post Author: fwinter
CA Forum: .NET
We have the same problem. A page footer generated in Word, embedded in a CR-Report shows in the report viewer with overlapping characters. This is "a known limitation" we were told. Not really a problem, but when exported to PDF, the PDF also shows the overlapping characters and prints with overlapping characters as well. This is our problem!We've tried different fonts, different font- an pagesizes in Word, the "can grow" checkbox etc. We believe, the result is affected by the printer driver but cannot really find a way, to avoid the problem and get a clear print at all of our customers.Anyone figured out how to solve the problem? CA Support unfortunatly couldn't help   We are using CR Merge Moduls XI R2 in our Report Viewer, Word 2003, Problem appears on local machines as well as on Citrix.

Similar Messages

  • Using Access to store OLE objects like Excel , Word docs and retrieve them

    Hi folks,
    I need a solution for this problem guys.
    The logic is like this : A portable exe file and a database. Database contains files stored ( embedded ) in it like Excel , Word , notepad etc.
    On running the exe file and giving necessary prompts or combo entries, it should display all files related to the selection and On clicking the link the document should open itself.
    Why I use Access : Most of the PC contains MS Office. Otherwise I have to use a lightweight protable database.
    Also it should be able to store files into it. As far as I know , Access can store excel and images etc. Is there any other protable db capable of storing excel and word docs.
    After storing how do I retrieve the file. I have read about displaying images. What about excel files...

    Portable as in the sense every one can cary the file and the MS access database and can access data whenever they want . They can carry it in their flash drive / USB drive. Only the data base would get updated with the data. So in effect , One could access the updated documents by the means of a query.
    This should work in Windows environment

  • Linked Ole Object with MS Word has bad resloution / invalid fonts

    Post Author: Winfried Boennhoff
    CA Forum: .NET
    Environment: .Net 2003 Viewer with external .rpt created by CR XI
    As result I get a bad resolution of the word document and the original fonts are not supported, I tried all common fonts. The font used by CR seems to be default font with a very bad resolution.
    The same effects not only with MS word, although with an linked PDF or any image. All have a very bad resolution.
    Is this a known Problem? Any Idea?

    Post Author: fwinter
    CA Forum: .NET
    We have the same problem. A page footer generated in Word, embedded in a CR-Report shows in the report viewer with overlapping characters. This is "a known limitation" we were told. Not really a problem, but when exported to PDF, the PDF also shows the overlapping characters and prints with overlapping characters as well. This is our problem!We've tried different fonts, different font- an pagesizes in Word, the "can grow" checkbox etc. We believe, the result is affected by the printer driver but cannot really find a way, to avoid the problem and get a clear print at all of our customers.Anyone figured out how to solve the problem? CA Support unfortunatly couldn't help   We are using CR Merge Moduls XI R2 in our Report Viewer, Word 2003, Problem appears on local machines as well as on Citrix.

  • Change value of option button (OLE object) in Microsoft Word file

    Hi guys,
    I would like to convert a macro from VBA to AppleScript. Unfortunately, I'm the beginner of AppleScript and I don't know how to change value of an option button in Microsoft Word.
    For example, I have an option button with 2 options (group name = question413) Yes and No. Now, I would like to open Word file, then change value of option button with group name "question413" to Yes. Below is my code in VBA.
    SetOptionButton "question413", "Yes"
    Public Sub SetOptionButton(GroupName As String, Value As String)
    Dim oShape As Word.InlineShape
    For Each oShape In ActiveDocument.InlineShapes
    If oShape.OLEFormat.ProgID = "Forms.OptionButton.1" Then
    If oShape.OLEFormat.Object.GroupName = GroupName Then
    If oShape.OLEFormat.Object.Caption = Trim(Value) Then
    oShape.OLEFormat.Object.Value = True
    Else
    oShape.OLEFormat.Object.Value = False
    End If
    End If
    End If
    Next
    End Sub
    How could I convert them to AppleScript?Any comments would be highly appreciated.
    Thanks,

    Hi
    Theirs a pretty in depth tutorial over at MACTECH, which I think will aid your in your code transition
    Moving from Microsoft Office VBA to AppleScript:
    MacTech's Guide to Making the Transition
    http://www.mactech.com/vba-transition-guide/index.html
    Budgie
    Message was edited by: Budgie
    Their is also the possibility you could use the "do Visual Basic" command, not to sure about thta though

  • Crystal report AS ole object into word

    I've been searching the web on using crystal reports as an OLE object inside a word document, but all results have been about using a word document inside a crystal report.
    I am trying to create a quarterly report document for a  business. This document is built using MS word. The document needs to include various tables, charts and the like, which they want to build in crystal reports so that they can be used either as part of the quarterly or as standalone reports.
    I would like to embed these reports into MS Word. Ideally, every three months the reports would be updated with new parameters, the word document would be opened, and the linked OLE reports would display the updated data tables and charts.
    I'm not sure if this is possible. I just attempted to embed a crystal report inside a word 2007 document, but the OLE object only showed up as an object containing the report filename, not the actual report.
    Can crystal act as an ole server for a word document to do what I want it to do, or will I need to programatically export the batch of crystal reports to images in order to have them show up in the word document?

    if you have business objects enterprise & live office, you can use Business Objects Live Office to embed the following from crystal reports into word or excel or powerpoint:
    1) charts
    2) cross tabs
    3) summaries
    4) fields
    to name a few.
    you can also use prompts in the word doc to allow you to change up the above on the fly.

  • OLE objects linked to MS Word/MS Excel do not update in InfoView

    I am facing the following problem:
    - Embedded a Word document as linked OLE object into a crystal report and stored it to Enterprise repository.
    - When opening the report with CR Developer from my workstation, links are updated and changes made in the .doc file are reflected, the report is updated
    - However when displaying and refreshing the report in InfoView changes aren't reflected.
    The OLE link (type document) is set to update automatically. I tried to store the report to the enterprise repository with and without data. Yet no difference - no update in either case. Neither scheduling nor opening and refreshing the report in InfoView helps.
    I further inserted an OLE object linked to a bmp image, and for the image refreshing works, even in InfoView
    So am I doing something wrong?
    Some threads in this forum indicate that only OLE linked pictures (bmp, jpg) can be refreshed dynamically, e.g.
    [Dynamically change path to OLE file]
    Others indicate that it is also possible to dynamically refresh OLE objects linked to .doc, e.g.
    [Re: Link to Word document doesn't refresh when running from Infoview]
    - Is it at all possible to dynamically display the contents of .doc or .xls files in a CR when viewing and refreshing the report in InfoView (without the need to reopen and resave the report with CR Developer first) ?
    - We are using BOE XI3.1 SP3 and Crystal Reports 2008 SP3.  On the BOE server Crystal Reports Developer is not installed. Can this be a prerequisite for the OLE links to update in InfoView?
    - Any other suggestions?
    Thanks
    Konrad

    Hi Don,
    Thank you for the quick reply.
    - You say that this works in CR Designer. That's right. As described above, even I can open the report with CR Designer and the links are getting updated.
    - However if I do not reopen and resave the report with Designer ... if I just open and refresh the report in InfoView to get the updated information from the files ... changes are not shown. I face this problem ONLY with ole links to .doc and .exe. OLE links to image formats such as .bmp do work. WHY?
    My files are already stored locally to the BO server and the (changed) image files are read and updated from exactly this directory. But not the linked Excel and Word files...
    Thanks
    Konrad
    Edited by: Konrad Hartl on Jan 25, 2011 8:04 PM

  • I would like to create a custom datagridview column containing text images and MS Word OLE objects

    I am an old time LabView programmer going back to 2.0.  But moved on with my career several years ago.  But here I am back attempting a custom column in dataviewgrid control.  .NET is hard.  My goal is to read in an MS Word document and parse it out to a custom column.  The column will contain regular old text, images and MS Word objects, sometimes called OLE objects.
    There is scant information on creating .NET and labview when it comes to form manipulation.  I have stuggled through the learning curve and now able to insert a text box column into a datagridview and add it to the form container and actually size it to the datagridview control.  I've added a menu, but still figuring out the layout class.  Did I say .NET is hard?
    I know there must be a custom column created and even found a C# example, sorta.  Trouble is the example uses easy stuff like override and private.  It will take me another 3 weeks for that, darnit I'm getting lazy.
    Does anybody out there have some example of a custom column in the datagridview?
    If you ask to post code.  I have nothing I would be proud to show.
    The sorta go by: http://www.codeproject.com/Articles/31823/RichTextBox-Cell-in-a-DataGridView

    This is what the progress looks like so far.  I broke the tasks down in sub VIs.  One to create a custom cell so I can add it to the column CellTemplate.  The other to add the column to the control.  My limited knowledge of .NET and the implementation in LV causes me to question the value of LV .NET.
    The coding to create a TextBoxCell override with ImageCell CellTemplate.  Honestly I'm guessing what to do, because the LV documentation on inheritance and overriding is poor at best.
    The column coding to add the cell to the custom column.
    Probe 19 always comes up with an error.  The error is the standard 1172 with no clue what is causing it.  The "index" will work on 0 or 1, I suspect bc the two cell types are 0 and 1 but nothing tells me that, just guessing.

  • Export To PDF with OLE Objects/Word

    I got a report that has several OLE Objects that are each linked to a Word document.
    Upon viewing the exported file, you notice that these objects have lost resolution and do not appear as clearly as they did in the report designer.
    Upgraded to SP 4. The issues is still happening.
    The issue happens when the linked word doc is right justified.
    Any idea what causes this?
    Using Crystal Reports 11.0.0.2495
    Using Word 2003

    you may try following things:
    1. Put crystal on the highest level of service pack(SP 4) and then check fro the results.
        https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm
    2.Suppress each section one by one (where these ole objects are placed) and then check whether a particular object is causing the trouble.Also, it will be clear if this issue is really due to ole objects or something else.
    3.you are currently on release 1.If you have a chance to test this on release 2 or CR 2008 then it would be better.
    Could you please explain what you exactly  mean by fuzzy/distorted.I mean, do the objects/text appear blurd/misalligned or what.

  • Unable to click on excel object within a word 2010 document

    Whenever a user tries to click an Excel Object within a Word 2010 document, the error "Microsoft Word can't start the application required to open this object. An error occured and this feature  is no longer functioning properly. Would you
    like to repair this feature now?". Clicking YES runs a repair on Office 2010, which does not resolve the issue. Clicking No gets you the following prompt: "The program used to create this object is Excel. That program is either not installed on your
    computer or it is not responding. To edit this object, install Excel or ensure that any dialog boxes in Excel are closed." 
    Operating System: Windows 7, Office Version: 2010
    I've tried the following to resolve the issue, without success:
    Running the Office Repair as suggested in the prompt
    There are no open dialog boxes in Excel
    There are no COM add-ins or Excel add-ins active in Excel
    Starting Word in Safe Mode (clicking CTRL on open) does not resolve the issue.
    "Ignore other applications that use Dynamic Data Exchange (DDE)" is unchecked in Excel.
    I am able to edit this document with no problem on a machine running Windows 7 with Office 2007 or even office 2013.

    Hi,
    Do you see this problem if you start Windows in Safe Mode? You might want to have a try and verify result, some outside application may be preventing the OLE server/client connection.
    Have you ever checked your anti virus? Try to disable it and check again.
    Please make sure to install any updates to your system or Office products. It's important to make it up to date.
    Try to go to your task manager to kill any excel process and then try again.
    I have seen a case that user finally fixed this with a clean uninstallation and reinstallation, if issue presists with all above steps, you might want to do a completely reinstallation and then try again.
    Thanks,

  • File Objects explode in word document

    Hai All,
    I am trying explode the various file object into word document (its like, object explode in word document) using Java but i cant do it. I searched many of the java sites and forums but not get right solution . Now i am using docx4j.jar file to create the word document. In that jar does not having the methods to explode the file objects. Any one can suggest me a right solutions regarding this.
    Any answers could be appreciated.
    Thanks in advance.
    Andavar.

    It is also a meaningless question and was posted in the wrong place [Generics]. Moving it to NTJ and locking it.

  • How to insert ole object like word doc at runtime

    To insert word doc into crystal report

    Hi Vinod,
    To add an OLE object in reports follow the steps given below-
    1- In CR environment open a Report in which OLE object needs to be added.
    2- Click on insert and click on OLE object.
    3- A wizard pops up - choose appropriate file for e.g- Microsoft World Document.
    4- two buttons will be there-
    a> Create new - creates a new world document.
    b> Create from new - Includes a exsisting file.
    5- one more option is their in wizard -
    Show icon(check box) - shows the OLE object as an icon in report.
    6- Click on ok and place the object at required position in report.
    Hope it works.
    Regards
    Amit

  • I have Microsoft Office 2008 and only use Word and Excel. It takes 980 mb. I am considering replacing it with Apple iWorks 2013. If I do, can I delete Office, and still access and modify my Word and Excel documents?

    I have Microsoft Office 2008 and only use Word and Excel. It takes 980 mb. I am considering replacing it with Apple iWorks 2013. If I do, can I delete Office, and still access and modify my Word and Excel documents?
    I have a MacBook Air and OS 10.9.4

    Ron
    Just adding to what CSound has said.
    Pages and Numbers will change Word and Excel documents when they open and close them.
    Sometimes the change is subtle and sometimes not. With the latest versions of Pages and Numbers, more likely not.
    So don't think you are going to work with MsOffice files without problems. You will always have something not right and in some cases really annoyingly not right. Like having all the text from Pages appear bold in MsWord, or page breaks in the wrong place or some objects and graphics not appearing in one or the other.
    If working between different Operating Systems and MsOffice files, I also recommend LibreOffice. It opens and saves nearly all file formats. Unfortunately not .pages or numbers. Yet. The folks at LibreOffice are busy adding to it all the time, and making sure it works in all Operating systems, Mac, Windows and Linux and they are promising iOS as well soon.
    Peter

  • Attention!!-don't use OLE object in Reports

    If you are planning to use or is currently using OLE objects in Reports-please don't use it as the object maynot reload in future and your report may not even open in Report Builder.I got this message when opening the report containing OLE object:
    REP-4004: Error occurred while restoring OLE object
    and it refused to open up crashing my days of work.
    The pity is I can't open my report even to remove the OLE object.

    I know that is weird.I placed the object in the same directory-but in vain.Afterall, what's the logic of putting it in the same directory after embedding it?

  • How do I use a protected document in Adobe Reader?

    I am trying to use a document that requires a user name and password in Adobe Reader on my tablet. The problem is that I have tried everything and nothing I do will allow me to enter this information. It says editing is not allowed with this protected document, but it is set up to allow editing so I can put in the info required to unlock the contents. I have attempted to search your database and all the answers I have tried have not worked. Please help! I am at a loss and I need this document unlocked. Thank you!

    Adobe Reader mobile products (Reader for iOS, Reader for Android, etc.) do not support commenting or form filling with secured (hence, encrypted) PDF documents.
    Please use the desktop version of Adobe Reader on your Windows or Mac computer to fill in the secured PDF form.  Sorry for the inconvenience.

  • In Reply to : How to validate org.jdom.Document object using xsd: dvohra09

    Hi All
    I am creating org.jdom.Document object using constructor Document() and adding children using setRootElement(), setChildren() and addContent() methods. The children are objects of org.jdom.Element. If i want to validate the org.jdom.Document using xsd what i have to do. Thanks in anticipation.

    I tried the below code and it is always giving the
    Parsing fatal error : The markup in the document preceding the root element must be well-formed.
    But it is possible to validate the same Document object as right document after writing it onto xml file using XMLOutputter and parsing it using DOMParser
    Thanks in anticipation
    org.jdom.Document document;
    String documentString=document.toString();
    StringReader stringReader=new
    StringReader(documentString);
    SAXBuilder saxBuilder =new
    SAXBuilder("org.apache.xerces.parsers.SAXParser",true);
    saxBuilder.setFeature("http://xml.org/sax/features/vali
    ation",  true);
    saxBuilder.setFeature("http://apache.org/xml/features/v
    lidation/schema",  true);
    saxBuilder.setFeature("http://apache.org/xml/features/v
    lidation/schema-full-checking", true);
    //Set a error handler with
    setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
    saxBuilder.build(stringReader);

Maybe you are looking for

  • MSI 785GM-E51 - Amount of usable RAM in Windows 7 Ultimate 64bit

    Hello i have the following system: Mobo: MSI 785GM-E51 Bios: AMI v 2.3 CPU: AMD Phenom II 955 BE @ 3.2Ghz Memory: 2 dimms of  ( KINGSTON KVR1333D3N9/2G DDR3 2GB PC10666 1333MHZ VALUE RAM ) , Total 4Gb GPU: Sapphire Radeon X1950 Pro with 256mb RAM OS:

  • Should I Get an iMac, Macbook Pro, or iPad (3rd Generation))

    I'm getting a new "computer" this summer, and I was wondering: Which Apple Device is right for me: iPad 3, iMac, or Macbook Pro? I realize WWDC is this summer (a day after I was planning on getting a Macbook Pro, June 10, which is my birthday) and Ap

  • Mac Projector Crashes When exported From Flash CS5.5

    Something strange that i noticed, when i had exported a presentation for a Mac, on a 64 bit windows 7 using flash cs5.5. the applicaton gets the paths of a few swfs from an XML file and loads them one after the other.. there is a small bit of interac

  • Mail auto-completion doesn't work

    In Mail prior to Mountain Lion, I just had to start typing an email address and the app would suggest addresses either from my address book, or from the history of people I wrote to or who wrote to me. If I copied and address and pasted it in a new m

  • Break implementation of Sales&Distribution FROM Production into phases

    I have found this forum very helpful and responsive.  Thanks for all the help. Due to the requirement of getting the ecommerce site up fast, is it possible to just implement: Sales Distribution side of business one 2007A APART From the Production MRP