OLE2 Excel File Save as password protected

Hi All,
I would like to save an Excel File as Password protected.
This File is created by OLE2.
How can I do this?
This is the Coding, how I save the File-->
CALL METHOD OF ls_wbook 'SaveAs' EXPORTING #1  = p_file.
Thanks for the Answers...
Bye
Besi

Hello Besi,
The following code should work. Try it out.
CALL METHOD OF document 'Protect' EXPORTING
                         #1 = 2
                         #2 = -1
                         #3 = 'password'.
CALL METHOD OF documents 'Save'.
Here 'document' is the 'ActiveDocument' object.
How to get the 'document'  object:
    CREATE OBJECT worddoc 'Word.Document'.
    GET PROPERTY OF worddoc 'Application' = wordapp.
GET PROPERTY OF wordapp 'ActiveDocument' = document.
Regards,
Jitendar

Similar Messages

  • HT4088 Will numbers open an excel file that is password protected? Xlsx latest ms excel?

    Will numbers open an excel file that is password protected? Xlsx latest ms excel?

    No. None of the iWork apps on any platform will open a password-protected Office file. You have to remove the password in Office first.

  • Share Excel File that is password protected

    Hello all
    I have published a workbook in our shared area at work. It's massive and also has another workbook linked to it.
    Both are password protected so are only available for viewing. But tons of people need to see them particularly the source file which is no problem because they can't change anything so can choose 'read only'.
    However the problem is when I need to go in there to make a couple of alteration, I have to wait until they close it or of course as is typical, they will leave their desk and forget to close it!!
    I haven't used the sharing workbook option although I've tried it and shown one of our departments to use it basically.
    I was wondering if this would be possible on a file that is password protected and is locked on every sheet.
    That way I can just go in when I need to even if someone's in there.
    This is an extremely important file that
    can not go wrong.  (I do have a backup)
    What are your views on this option and what is the best way to go about it?
    Thanks

    Hi,
    Would you like to tell me which Excel version are you using? According to your description, I recommend we try the two methods:
    Method 1:
    Excel has a feature "Protected the sheet", we can assign the different password to each sheet.
    For more detail information, please refer to the following link:
    http://office.microsoft.com/en-gb/excel-help/password-protect-worksheet-or-workbook-elements-HP010078580.aspx
    Method 2:
    Share the Excel workbook, and assign the edit range/permission to users. We can allow specific users to edit ranges in Excel. Here is the steps:
    Click 'Review', 'Allow Users to Edit Ranges','New'. In 'Title', enter the name. In 'Refers to cells', enter an equal sign (=) and enter the reference. In 'Range password', enter password. Click 'Permissions'. Click 'Add'. Enter the name. Click 'Protect Sheet',
    enter password. Click 'OK'.
    https://askdrexel.drexel.edu/app/answers/detail/a_id/2498/~/how-to%3A-allow-specific-users-to-edit-ranges-in-excel-2007.
    http://office.microsoft.com/en-us/excel-help/use-a-shared-workbook-to-collaborate-HP010096833.aspx
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • -I have a password protected excel spreadsheet, how can I get my iPads and iPhones to read this and save it password protected?

    I have a password protected excel spreadsheet, how can I get my iPads and iPhones to read this and save it password protected?

    Documents to Go says that it, "Opens password protected Excel 97-2008 files", but does not say whether it can save them as "password protected".
    This might work for you.

  • How do I save a password protected file without a password?

    Someone sent me a password protected file and I want to save it on my computer without the password.
    Thanks,
    Scott

    Hi Scott,
    It is not possible to save a password protected file without a password with Adobe Reader, you would require Adobe Acrobat to remove the password protection. Even with Adobe Acrobat you can only remove the security if you are aware about the password otherwise you need to contact the Author/creator of the PDF to remove the security.
    Regards,
    ~Pranav

  • SAP version 4.7  Email pdf file that is password protected.

    Hi Gurus,
    We have a requirement:
      Email pdf file that is password protected.
      Once the user receives the email,  clicks on the attached pdf file,
         it should ask the password.  Note that Password value should come from SAP.
    What we have done is get the spool number and by using function module CONVERT_ABAPSPOOLJOB_2_PDF, it converts the spool document to pdf.
    On this function module, there are no parameters to make pdf as password protected and
      also include the password.  This is the problem.
    Question:
       (a) Is there a way to make pdf password protected that will be emailed?
            What function modules, etc to be used?  (sample coding if available)
       (b) Somebody mentioned the that Adobe LiveCycle Policy Server should be installed together with SAP.
            If this is installed, how then would be the abap coding be in order to make the pdf password
                protected?
            How is the new policy server gonna be linked to SAP and how do the abap coding gonna be?
               (sample abap coding if available)
    Thanks.
    Raymund

    hi,
    First save the file somewhere... LINK:[SITE|http://www.sapfans.com/forums/viewtopic.php?f=13&t=326228]
    In the site i send above you need to change it do receive parameters ou use always the same name...compile and then use the function 'WS_EXECUTE' - watch it in LINK: [SITE|http://www.sap-img.com/abap/ws-execute-to-call-external-program.htm]
    and then..you just have to download it again into an ITAB and send it by mail... LINK:[SITE|How to pass pdf data to ABAP itab;
    Hope it helps..

  • Progmatically save to password protected network folder

    I am looking to save a file to a password protected network folder.  I tried using the standard Write Text.vi to see if a dialog would pop up, but it did not.  There is not an ftp server running on the networked computer, so I dont think that will work.
    The IT department directions to the folder say:  Go to Start> Run and enter url \\computername\folder\subfolder\...  and a dialog will appear to enter username and password.
    Any ideas??
    Thanks
    Kenny

    muks wrote:
    Well this is what we do. Run--->(doubleslash(\\) computername slash(/) d$)
    Eg: \\pc48\d$ .When you get a popup(U should) type the username and password of the that computer having admin rights.
    That simply reiterates what the IT department originally told the poster to do, except that you're using the administrative share. 
    Kenny K wrote:
    I should have noted that there
    should be no user interaction, ie they should not be entering the
    username and password, the program should login and save the file
    automatically.  sorry.
    To do this you will need to delve into the Windows API. You can also use .NET to perform impersonation. Most of the examples that are on the internet are based on .NET 1.1 and it's probably easier to simply create yourself a custom class that you can call using a single method rather than trying to put all the .NET code into LabVIEW. An example of using impersonation (though there are lots of them) can be found here. 

  • How to ZIP a PDF File with a Password Protection

    Hi,
    i've a pdf file with created smartforms and i want to assign a password to that pdf file but the SAP doesn't let doing that protection. So i want to create a zip file with a password protection for PDF file.
    How can i create a zip file with a password protection? Can somebody help me please?
    Thanks.

    Hello,
    Check this links
    Take a look to the class CL_ABAP_GZIP
    open (top-)zip-archive
    CALL METHOD lo_zip->load
        EXPORTING
          zip             = lv_zip_file_head
        EXCEPTIONS
          zip_parse_error = 1
          OTHERS          = 2.
    create sub-zip-archives which contain the files you would assign to a folder
    add sub-zip-archive to top-zip-archive
    CALL METHOD lo_zip->add
         EXPORTING
            name    = lv_zip_filename
            content = lv_zip_file.
    save zip-archive
    CALL METHOD lo_zip->save
        RECEIVING
          zip = ev_zip_file.
    ABAP Development
    How to ZIP a PDF file email attachment
    Re: How to ZIP a PDF file email attachment

  • Deploying of an .ear file which is password protected

    When we try to deploy a password protected .ear file,through the Weblogic
    Console,the deployment fails.
    java.io.IOException: invalid CEN header (encrypted entry) with :
    D:\SAMPLEAPP.ear at java.util.zip.ZipFile.open(Native Method) at
    java.util.zip.ZipFile.<init>(ZipFile.java:114) at
    java.util.jar.JarFile.<init>(JarFile.java:133) at
    java.util.jar.JarFile.<init>(JarFile.java:97) at
    weblogic.utils.jars.JarFileDelegate.<init>(JarFileDelegate.java:32) at
    weblogic.utils.jars.VirtualJarFactory.createVirtualJar(VirtualJarFactory.java
    :24) at
    weblogic.application.compiler.SCACompilerFactory.createMerger(SCACompilerFact
    ory.java:37) at
    weblogic.application.compiler.flow.AppMergerFlow.createMerger(AppMergerFlow.j
    ava:68) at
    weblogic.application.compiler.flow.AppMergerFlow.mergeInput(AppMergerFlow.jav
    a:85) at
    weblogic.application.compiler.flow.AppMergerFlow.compile(AppMergerFlow.java:4
    1) at
    weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java
    :69) at
    weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.ja
    va:41) at
    weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36) at
    weblogic.application.compiler.FlowDriver$CompilerFlowDriver.compile(FlowDrive
    r.java:96) at
    weblogic.application.compiler.AppMerge.runBody(AppMerge.java:157) at
    weblogic.utils.compiler.Tool.run(Tool.java:158) at
    weblogic.utils.compiler.Tool.run(Tool.java:115) at
    weblogic.application.compiler.AppMerge.merge(AppMerge.java:169) at
    weblogic.deploy.api.internal.utils.AppMerger.merge(AppMerger.java:88) at
    weblogic.deploy.api.internal.utils.AppMerger.getMergedApp(AppMerger.java:63)
    at
    weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.create
    DeployableObject(WebLogicDeployableObjectFactoryImpl.java:181) at
    weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.create
    LazyDeployableObject(WebLogicDeployableObjectFactoryImpl.java:156) at
    weblogic.deploy.api.tools.SessionHelper.inspect(SessionHelper.java:661) at
    com.bea.console.actions.app.install.Flow$2.execute(Flow.java:469) at
    com.bea.console.utils.DeploymentUtils.runDeploymentAction(DeploymentUtils.jav
    a:5000) at
    com.bea.console.actions.app.install.Flow.appSelected(Flow.java:467) at
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
    java:25) at java.lang.reflect.Method.invoke(Method.java:597)
    I would like to know the steps how to deploy a ear file which is password protected. The ear has one jar file & a war file.
    Awaiting suggestions
    Karthik

    Hi Karthik,
    there is one enhancement request were opened for this issue.
    BUG 12605295.
    you need to wait till this got updated.
    Regards,
    Kal

  • Why can't I save my password protected file in a password protected folder?

    I've just encrypted my folder which contains password protected files. I've attempted to save a new password protected file (Word document) but have had to save it to my desktop because when I try to save the file to the folder I receive a message: "Word cannot save or create this file. The disk may be full [which it is not] or write-protected [which it is]". Sooooooo. Does this mean I can only password protect the folder and not the files? Which is really annoying because I really do need the two levels of security. Please can someone help?

    File Vault is not in Disk Utility.  It is in System Preferences/Security/FileVault.

  • Cannot save a password-protected file

    The bank has sent me my own statement except it is password protected. I want to save this file WITHOUT password protection.  How would I do this?  I am using ADOBE X.
    Thanks

    You can't do this in the free Reader. Only in Acrobat. Even in Acrobat, the bank could have protected the document in a fashion that you can't remove the security setting.

  • Excel file save error: Someone else is working in file right now. Please try again later.

    When trying to save a modified Excel file, which has been opened from a network share, our users are receiving the following message:
    Someone else is working in "\\domain.com\users\username\Document.xls" right now. Please try again later.
    The clients that have been affected are Windows 7 clients, and the DFS share is being served from a Windows 2012 server. I have already confirmed that DFS replication has not been enabled, so it isn't trying to lock files for replication. I have also disabled
    any real-time scanning that is occurring on the client to make sure that the AV software wasn't locking the files. I did notice when viewing the list of Open Files from the server's Computer Management console that when a users experiences this issue the file
    appears to be opened 4 times. Three times it shows that it was opened in Read mode and the 4th instance shows an Open Mode of Write. Typically, a file which is working correctly should just show one instance with the Open Mode of Read+Write. None of these
    open instances are temporary files preceded with a ~.
    Any thoughts?

    Hi,
    Does the issue occur in other operation system? Which Office version are you using? Have you ever tried to test with word document, PPT file or txt file?
    Based on your description, the issue may be caused by the same file open multiple time in computer management on SQL server. The user probably has User Access Control (UAC) enabled on the machine and it is not letting him overwrite the existing
    copy of the file because she does not have it open in administrator mode. UAC will block overwriting (saving) the existing file without Administrative privileges and it will automatically open the save as dialog so you can save with a different name and
    if you click save without changing the name at the point, it tries to save as a new file over the existing file and it can't because the file is open.
    I recommend you check the user's permission (Which showed in Computer Management console) and end the Excel file instance in the task manager of the user's client.
    Also, we may try the workaround: Save it to local drive(like drive c:) and then copy it to DFS.
    Thanks
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

  • Why is Get File Type.vi password protected

    Hi...  We have a code that was developed in LabVIEW 8.6...  We have a need to attempt to save this code all the way back to version 7.1...  I saved it back from 8.6 --> 8.5 --> 8.2.1 --> 8.0 with no issues...  But when I then try to save it back from 8.0 to 7.1 I encounter one LabVIEW 8 vi that has no equivalent functionality in 7.1...  And that one vi is
    C:\Program Files\National Instruments\LabVIEW 8.x\vi.lib\Utility\lvfile.llb\Get File Type.vi
    When I look at that vi in 8.x, to endeavor to see if I can replace its functionality by writing some code in 7.1, I find that the Get File Type.vi is password protected...  More out of curiousity than anything, why is that code password protected???  I wasn't aware that any of the standard purchased LabVIEW code came password protected...  Can anyone tell me why that is???  thanks...  bob..
    Solved!
    Go to Solution.

    That VI is using an internal callback into LabVIEW (i.e. non G-based code) to determine the type of the file.  I'm guessing the callback doesn't exist in 7.1, so you would need to write your own G-based implementation for getting the type of a file  in the 7.1 case.  The simplest solution would be to work with the extensions of the files...not perfect, but probably close enough assuming your files are well-named.  Also, the following VI can give you a bit more information about LabVIEW-specific files (independent of extension):
    LabVIEW 7.1\vi.lib\Utility\libraryn.llb\Librarian Get Info.vi
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Operations on Text File - Encrypt, Decrypt, Password Protected

    Dear Experts,
    My requirement is to upload a text file  and do some operations on it and then encrypt the content in it ans save it on application server with password protected. Later i want to decrypt it.
    Please help me for the following:
    How to encyypt and decrypt the text file using standard encryption alogrithms like DES, MD5, RSA? Are there any standand function modules for both encryption and decryption which accepts a user defined public key?
    How to download a password protected text file?
    Thanks in advance.

    CALL FUNCTION 'Z_CRYPT_FILE'
            EXPORTING
              SOURCE_PATH         = WS_PATH
              SOURCE_FILE         = WS_OLDFILE
              DESTINATION_PATH    = WS_NEW_PATH
              DESTINATION_FILE    = WS_NEWFILE
              SWITCH              = 'E'
              KEY                 = ZUSER_PW
              KEEP_SOURCE_FILE    = ' '
            EXCEPTIONS
              INVALID_SWITCH      = 1
              SOURCE_FILE_NOTFOUND = 2
              DIDNT_WORK          = 3.
    FUNCTION MODULE Z_CRYPT_FILE 
    DATA: CINPUT(300) TYPE C.
    DATA: BEGIN OF LIST OCCURS 0,
            DATA(238) TYPE C,
            DELIMITER(04) TYPE C,
            FILE(12) TYPE C,
          END OF LIST.
    DATA: SOURCE TYPE ZCHAR200.
    DATA: DESTINATION TYPE ZCHAR200.
    DATA: ZINDX TYPE I.
    DATA: msg(100).
    IF SWITCH = 'E'.
       IF FILETYPE = 'T'.
          OPEN DATASET SOURCE IN TEXT MODE FOR INPUT ENCODING DEFAULT
             message msg.
       ELSE.
          OPEN DATASET SOURCE IN BINARY MODE FOR INPUT message msg.
       ENDIF.
       IF SY-SUBRC <> 0.
          RAISE SOURCE_FILE_NOTFOUND.
       ENDIF.
       CLOSE DATASET SOURCE.
       CLEAR CINPUT.
       CONCATENATE '/usr/local/bin/gpg -sev -r'
        KEY
        '-o'
        DESTINATION
        SOURCE
       INTO CINPUT SEPARATED BY SPACE.
       CONCATENATE CINPUT '2>&1' INTO CINPUT SEPARATED BY ' '.
       CALL 'SYSTEM' ID 'COMMAND' FIELD CINPUT ID 'TAB' FIELD
                                  LIST-SYS.
       IF FILETYPE = 'T'.  
          OPEN DATASET DESTINATION IN TEXT MODE FOR INPUT ENCODING DEFAULT
             message msg.
       ELSE.
          OPEN DATASET DESTINATION IN BINARY MODE FOR INPUT message msg.
       ENDIF.
       IF SY-SUBRC = 0.
          CLOSE DATASET DESTINATION.
          IF keep_source_file <> 'X'.
             CLEAR CINPUT.
             CONCATENATE 'rm' SOURCE INTO CINPUT
             SEPARATED BY SPACE.
             CALL 'SYSTEM' ID 'COMMAND' FIELD CINPUT ID 'TAB' FIELD
                            LIST-SYS.
          ENDIF.
       ELSE.
        write: 'Encryption error  on command: ',
           cinput.
        skip 1.
         loop at list.
            write: / LIST.
           endloop.
          RAISE DIDNT_WORK.
       ENDIF.
       IF FILETYPE = 'T'.  
          OPEN DATASET SOURCE IN TEXT MODE FOR INPUT ENCODING DEFAULT.
       ELSE.
          OPEN DATASET SOURCE IN BINARY MODE FOR INPUT.
       ENDIF.
       IF SY-SUBRC <> 0.
          RAISE SOURCE_FILE_NOTFOUND.
       ENDIF.
       CLOSE DATASET SOURCE.
       CLEAR CINPUT.
       CONCATENATE '/usr/local/bin/gpg -o'
        DESTINATION
        SOURCE
       INTO CINPUT SEPARATED BY SPACE.
       CONCATENATE CINPUT '2>&1' INTO CINPUT SEPARATED BY ' '.
       CALL 'SYSTEM' ID 'COMMAND' FIELD CINPUT ID 'TAB' FIELD
                                  LIST-SYS.
      REFRESH LIST.
      CLEAR LIST.
       IF FILETYPE = 'T'. 
          OPEN DATASET DESTINATION IN TEXT MODE FOR INPUT ENCODING DEFAULT.
       ELSE.
          OPEN DATASET DESTINATION IN BINARY MODE FOR INPUT.
       ENDIF.
       IF SY-SUBRC = 0.
          CLOSE DATASET DESTINATION.
       ELSE.
    *list output if error
          loop at list.
            write: / LIST.
           endloop.
          RAISE DIDNT_WORK.
       ENDIF.
    ENDIF.

  • Saving PDF files in a password protected FTP site

    Hi Experts,
    I have an Adobe Form which I want to save in a Password protected FTP site.
    I have written the following code in the submit button
    TYPE = HTTP Submit
    URL = ftp://username:password@host/
    But once the submit is clicked, I can see ONLY the display of the files in this FTP Server.
    My requirement is, I want this PDF file saved in the FTP server.
    How do I achieve this??
    Thanks
    KR

    If you are using the Adobe Reader plug-ins in Safari, then the only functional way to save the PDF locally (without damage) is to use the save functionality that Adobe (not Safari Save As…, Export, or Print > PDF) provides. These examples were captured on OS X 10.9.5. Safari 7.1.2. Adobe Reader 11.0.10.
    Your first link will offer a roll over Adobe toolbar near the bottom-center of your displayed PDF document. Use the Save icon on the far left.
    The second link produces the Adobe sub-toolbar with the Save icon.

Maybe you are looking for