OLE - Save method

hi,
    i want to save a word file into my desktop, I am able to open a word document, feed data using OLE and when I am trying to save using the below code
  CALL METHOD OF wordobj 'SaveAs' EXPORTING
    #1 = 'c:\11\information1.doc'
    #2 = '0'
    #3 = 'False'
    #4 = ''
    #5 = 'True'
    #6 = ''
    #7 = 'False'
    #8 = 'False'
    #9 = 'False'
    #10 = 'False'
    #11 = 'False'.
The corresponding VB code is as below
Sub saveonly()
' saveonly Macro
' Macro recorded 3/12/2009 by Krishna
    ChangeFileOpenDirectory "C:\Documents and Settings\krishna\Desktop\"
    ActiveDocument.SaveAs FileName:="112111.doc", FileFormat:=wdFormatDocument _
        , LockComments:=False, Password:="", AddToRecentFiles:=True, _
        WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
         SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
        False
End Sub
Please let me know what is wrong in this code.. I have searched the SDN forum, but I could not find a solution ..
Thanks
Krishnan

thanks, I did resolve this problem.
The actual statemetn is as below
CALL METHOD OF wordobj 'FileSaveAs' EXPORTING #1 = p_file.
p_file is file path.

Similar Messages

  • Ecatt script fails due "Error in OLE API method Call"  error

    Hi ,
    Ecatt scripts fails due to "Error in OLE API method Call" error, this error message occurs once a while.
    We are calling testpartner scripts from Ecatt using REFEXT command. At times this ECATT script fails due to above issue.
    Please help in solving this issue.
    Thanks,
    Asha

    >
    Asha Nagaraj wrote:
    > Hi ,
    >
    > Ecatt scripts fails due to "Error in OLE API method Call" error, this error message occurs once a while.
    >
    > We are calling testpartner scripts from Ecatt using REFEXT command. At times this ECATT script fails due to above issue.
    >
    > Please help in solving this issue.
    >
    > Thanks,
    > Asha
    Hi Asha,
    Are those components are connected and the necessay settings has been done?
    Regards,
    SSN.

  • *ERROR IN OLE CALL - METHOD CALL ERROR...*

    HI ..
    When trying to Upload a file using BDC with Vista OS, we are getting the following error..
    ERROR IN OLE CALL - METHOD CALL ERROR...
    There is no problem with BDC as its working fine with XP & other OS.
    Pls help!!

    Seems that you are working with microsoft files.
    Maybe you are using deprecated functions like WS_EXCEL

  • SaveAs() method doesn't work for PDF file

    I used the script below to generate a PDF file. When I ran it, no error occurred but no PDF was generated either
    var pdf = new File("E:\\STWWEB1\\CDLG_ILL\\temp\\jpeg\\640\\1.pdf");
    docRef.saveAs(pdf);
    Does anybody know what's wrong?

    PDF needs to have a new instance of the PDFSaveOptions created. Look at the JS Reference
    PDFSaveOptions
    Options for saving a document as an Adobe PDF file, used with the saveAs method. All properties are optional.
    Saving to PDF format
    // Saves the current document as PDF to dest with specified options
    // dest contains the full path and file name to save to
    function saveFileToPDF (dest) {
    var doc = app.activeDocument;
    if ( app.documents.length > 0 ) {
    var saveName = new File ( dest );
    saveOpts = new PDFSaveOptions();
    saveOpts.compatibility = PDFCompatibility.ACROBAT5;
    saveOpts.generateThumbnails = true;
    saveOpts.preserveEditability = true;
    doc.saveAs( saveName, saveOpts );

  • FileReference.save() method is undefined in Adobe AIR ?

    Hi,
      I am developing  a desktop application using adobe AIR.I need to use FileReference.save() method.But an actionscript error occuring during run time which says save() method is undefined for FileReference and there is no default value.I am running the application in eclipse.Is it due to the version problem of my AIR ? Please reply.

    Hi,
       Thanks for your answer.But I am getting that type of exception while running the application from eclipse.So please suggest a solution for this.

  • BADI_LE_SHIPMENT At Save Method ..

    Hi Experts ,
    I am using At Save Method of BADI_LE_SHIPMENT .
    My requirement is , I need to fill Suppl 1 field (VTTK-ADD01), when ever user creates or changes a shipment . When i am changing the table NEW_VTTK , it's not getting saved in VTTK table .
    Please Help !!!
    Thanks .

    Hello Joe
    Are you changing the right NEW_VTTK tab (within CHANGING parameter CHA_SHIPMENTS_AT_SAVE)?
    If so you have to play around with the indicators (TRA_SAVE_CALLER).
    Regards
      Uwe

  • Bopf save method

    Hi all,
    we have scenario where we are updating multiple record in bopf tables.
    in this we are using modify and save method of transnational manager.
    if we are updating 10 records and if  5th record is getting error while saving .
    it will not update remaining records.
    and save method will have 5th record error and same error its giving for the 6th record and not updating data .
    here 6th record data is correct and it should update.
    how we should clear this eo_messages of previous record in save method.
    any idea.
    thanks.
    Kesar.

    Hello Keser,
    Since you use the transaction manager save , I assume that you are updating the records from a report or some kind of external service consumer. How do you do the update ? Do you do a mass update by building all records in the modifications table and make a single call , or do you make a separate modify call per record ?
    If the error message leads to a failed save , it would mean that the BO has a consistency group of validations configured preventing the save from failing when the BO is inconsistent ( meaning if the validation return a failed key , the BO is inconsistent and shall not be saved ) resulting in the entire transaction failing.
    From a consumer perspective , the BO service provider provides the message to the service consumer indicating what is wrong , subduing/ignoring/removing that message will not result in the whole transaction proceeding to a successful save.
    You can do one of the two things here.
    1. The bad way - create one transaction per record, so only the transaction with the inconsistent record fails , the others are successful. This is not a recommended approach , you should always make use of mass enablement wherever possible.
    2. React to the error message from the first failed transaction , correct the inconsistent record and attempt the modification again. This method might require some user interaction , and goes against the idea of a fire and forget report.
    Thanks,
    Indranil.

  • SaveAs Method Of Workbook Class Failed Upon fIntersectionCheckEx

    We are in the process of migrating from FDM and HFM 9.3.1 to 11.1.2.1. Because of the performance issues that we previously experienced with FDM's MultiLoad functionality, we've been using UD5 and UD6 and an adapter customization to load Year and Period. To accommodate the "extra" dimensions, we're also using custom Event scripts, check reports, etc.. The built-in intersection check is disabled. The AftValidate script contains our custom intersection check and follows below. When the Validate phase is executed from the web client, the following error appears in the log:
    ** Begin fdmFM11XG5E Runtime Error Log Entry [2011-10-13-12:03:15] **
    Error:
    Code............1004
    Description.....SaveAs method of Workbook class failed
    Procedure.......clsHPDataAccess.fIntersectionCheckEx
    Component.......C:\FDMData\fdm-hfm-adapter-V25481-01\FinancialDataManagement\FM11X-G5-E_1005\AdapterComponents\fdmFM11xG5E\fdmFM11XG5E.dll
    Version.........145
    Identification:
    User............larryr
    Computer Name...SVRHYPFDMV103
    FINANCIAL MANAGEMENT Connection:
    App Name........
    Cluster Name....
    Domain............
    Connect Status.... Connection Open
    ** Begin FDM Runtime Error Log Entry [2011-10-13 12:03:15] **
    ERROR:
    Code............................................. -2146233088
    Description...................................... SaveAs method of Workbook class failed
    At Line: 59
    Procedure........................................ clsEventHandler.PobjAPI_AftValidate
    Component........................................ upsWObjEventHandlerDM
    Version.......................................... 1112
    Thread........................................... 4828
    IDENTIFICATION:
    User............................................. larryr
    Computer Name.................................... SVRHYPFDMV103
    App Name......................................... SAPHFM
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... SQLOLEDB
    Data Server...................................... svrsql105
    Database Name.................................... SAPHFM
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... AHEL_F1
    Location ID...................................... 752
    Location Seg..................................... 6
    Category......................................... FctAug
    Category ID...................................... 16
    Period........................................... M12 - FY12
    Period ID........................................ 4/30/2012
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    ** Begin FDM Runtime Error Log Entry [2011-10-13 12:03:15] **
    ERROR:
    Code............................................. 440
    Description...................................... Automation error
    Procedure........................................ clsValidationMgr.fValidate
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 4828
    IDENTIFICATION:
    User............................................. larryr
    Computer Name.................................... SVRHYPFDMV103
    App Name......................................... SAPHFM
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... SQLOLEDB
    Data Server...................................... svrsql105
    Database Name.................................... SAPHFM
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... AHEL_F1
    Location ID...................................... 752
    Location Seg..................................... 6
    Category......................................... FctAug
    Category ID...................................... 16
    Period........................................... M12 - FY12
    Period ID........................................ 4/30/2012
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    Custom intersection check via AftValidate. Line 59 is fIntersectionCheckEx:
    Sub AftValidate(strLoc, strCat, strPer, lngProcState)
    'UpStream TB EVENT Script
    'Purpose:   Perform custom intersection check - customized for multiple periods
    Dim strTableName, strSQL'               Query variables
    Dim strPerYear, strPerMonth'          Target HFM Year & Month
    Dim strCatKey, strLocKey'               ID of POV Category & Location
    Dim strErr, strHTMFile'                    Error information
    Dim objHWReturn'                         Return object for intersection validation
    Dim objPeriod'                              Period object
    Dim fso'                                   File system object
    Dim rs'                                        Recordset containing unique HFM Target intersections
    Dim vaData'                                   Array containing unique HFM Target intersections
    ' Initialize Block Processor For HFM connection
    Dim BlOCKPROC
    Set BlOCKPROC = CreateObject("upsWBlockProcessorDM.clsBlockProcessor")
    BlOCKPROC.Initialize API, SCRIPTENG
    ' Call the Connect Action for the active integration block
    Set API.IntBlockMgr.IntegrationMgr.PobjIntegrate = BlOCKPROC.ActConnect("CheckDims")
    If API.IntBlockMgr.IntegrationMgr.PobjIntegrate.intResult Then' Connection is open
         'Get Target information
         strLocKey = CStr(RES.PlngLocKey)
         strPerKey = CStr(RES.PdtePerKey)
         strCatKey = CStr(RES.PlngCatKey)
         Set objPeriod = API.POVMgr.fPeriodKey(strPer)
         strPerYear = objPeriod.strTargetYear
         strPerMonth = objPeriod.strTarget
         Set objPeriod = Nothing
         strTableName = "tDataSeg" & API.POVMgr.fGetLocationSegment(strLocKey)' Get tDataSeg number for location
         strBaseName = strLoc & "_" & strCat & "_" & strPerMonth & "_" & strPerYear
         strLogsDir = DW.Connection.PstrDirOutbox & "\Logs\"
         strFile = strLogsDir & strBaseName & ".fmv"
         ' Create the SQL to pull the validation records
         ' Do not Validate the Keystone Custom2 records since their "parent" Classic Custom2 records are validated
         strSQL = "SELECT DISTINCT EntityX, PartitionKey, CatKey, PeriodKey, DataView, AccountX, ICPX, UD1X, UD2X, UD3X, UD4X," & _
                                         " '' AS UD5X, '' AS UD6X, '' AS UD7X, '' AS UD8X, '' AS UD9X, '' AS UD10X, '' AS UD11X," & _
                                       " '' AS UD12X, '' AS UD13X, '' AS UD14X, '' AS UD15X, '' AS UD16X, '' AS UD17X, '' AS UD18X," & _
                                       " '' AS UD19X, '' AS UD20X, '' AS Amt " & _
                    "FROM " &strTableName& " WITH (NOLOCK) " & _
                    "WHERE CatKey=" &strCatKey& " AND PeriodKey='" &strPerKey& "' AND PartitionKey=" &strLocKey
         'Validate all records in the result set
         Set rs = DW.DataAccess.farsFireHose(strSQL, False)
         With rs
              If Not .EOF Then' Create the array to pass to intersection checking
                   vaData = .GetRows(.RecordCount)
                   Set objHWReturn = API.IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.fIntersectionCheckEx(vaData, CStr(strCat), CStr(strPerMonth), CStr(strPerYear), "YTD", "<Entity Currency>", CStr(strFile), "FM Account", "FM Entity", "ICP", "Custom1", "Custom2", "Custom3", "Custom4", 15, 9, 2)
                   If objHWReturn.PblnIsErr Then
                        RES.PstrActionValue = objHWReturn.PstrErrFile
                        RES.PlngActionType = 4' Display HTML file on web client
                        API.MaintenanceMgr.mProcessLog strLoc, strCat, strPer, 2, False, "Custom Intersection Validation Error:  Error creating validation array", Now()
                   Else' Delete the html header file for the error free validation
                        strHTMFile = strLogsDir & strBaseName & ".htm"
                        Set fso = CreateObject("Scripting.FileSystemObject")
                        If fso.FileExists(strHTMFile) Then fso.DeleteFile strHTMFile, True
                        Set fso = Nothing
                   End If
                   Set objHWReturn = Nothing
              Else
                   strErr = "AftValidate Event Script error:  No data for intersection check" & vbCrLf
                   RES.PstrActionValue = strErr & "You must re-run the Import before running the Validate again"
                   RES.PlngActionType = 2' Display the error string
              End If
              .Close
         End With
         Set rs = Nothing
    End If
    'Destroy the remaining objects
    Set API.IntBlockMgr.IntegrationMgr.PobjIntegrate = Nothing
    Set BlOCKPROC = Nothing
    End Sub

    Thanks, Tony. I no longer get the "SaveAs method of Workbook class failed" error. Now, when there are intersection check errors, instead of the intersection check report automatically opening in a new tab, I get a "File Download" message box with Open and Save buttons. If I choose Open, I get the "404 - File or directory not found" error. If I choose Save and save the file to a local path, I never get the option to open the file and the "Processing. Please wait..." message runs forever.
    Per the FDM ReadMe, I've installed MSXML 3.0 SP7 on both the FDM server and client machines. I've set security to the lowest setting in IE 7.

  • About SaveAs method

    Hi, all.
    I want to convert a pdf file to eps through Illustrator in an MFC application.
    Can I do this with only by open the pdf file, and save as eps file, this is just same like when I do it by operation.
    The code is written below. But I'm facing a problem, even though the file name in SaveAs method set to ".eps", an .ai file was created not eps.
    Anybody knows why ? did I something wrong or insufficient setting in this code ?
    Illustrator::_EPSSaveOptionsPtr pEPS;
    pEPS.CreateInstance(L"Illustrator.EPSSaveOptions");
    pEPS->PutCompatibility(Illustrator::aiIllustrator12);
    pEPS->PutCMYKPostScript(true);
    Illustrator::_ApplicationPtr pXL = pEPS->GetApplication();
    pXL->Open("C:\\Sample.pdf");
    DocumentPtr pDoc = pXL->GetActiveDocument();
    pEPS.CreCreateInstance(L"Illustrator.EPSSaveOptions");
    pDoc->SaveAs("C:\\Sample.eps");

    what if you use the documentSuite -> write(<File>,<eps-handler>,false)?<br /><br />the handler could be obtained by:<br /><br />int i=0;<br />for(; i< number of handlers; i++)<br />{<br />   if(handlers.get(i) is the handler that creates eps files)<br />      break;<br />}<br />if(i<number of handlers)<br />{<br />   write file<br />}

  • Need OLE Execution Method.vi

    Hi,
    I would like to know if a VI "OLE Execution Method.vi" was included in Labview versions 4 and below. If there was, what has it been replaced with?
    I would be really grateful if someone could provide me with this small piece of information. Thank you very much.

    Elle - 
    Being able to access the vi palette from LabVIEW versions prior to 4 would be a near astronomical task.  What are you trying to do with this information?  If you are looking to upgrade from an older version of LabVIEW please reference my note below:  
    LabVIEW 6.0 and later no longer contain the OLE VIs previously located in C:\Program Files\National Instruments\<LabVIEW>\vi.lib\Network\ole.llb. Instead of OLE VIs, use the ActiveX Automation nodes located on the Functions»Communication»ActiveX palette.
    Regards,
    Ben
    National Instruments
    Regards,
    Ben N.
    Applications Engineering
    ni.com/support

  • PDF Export Problems @ Printers - Save Methods?

    I am working on a brochure that is mostly white text on black, with a few full colour pictures. There are also some manufacturer's logos that I inverted in PS to make them white on black too, all in CMYK mode in PS. Though there were still black boxes around the logo's they were going on the black background so I though I would be safe... I tried the "instant alpha" tool in Pages but the pictures are too low-res for this method to work effectively (it rounded all the points and made the images).
    For the first proof I used the file>export>PDF>best method, and all looked good on my computer but the colours that were produced from the print shop (The UPS Store) looked appalling. Contrast was great on all the white on black text, but the colours were completely off. (however, there were no black boxes around the logos I was worried about, so that was a plus)
    I did a fairly thorough web search of other print methods, and came across the file>print>pdf>save as postscript method that involved using Adobe Distiller to create the PDF rather than Pages. After getting a proof back from the print shop today I was pleased to see that the colours now appeared accurate on the proof but the black on black box problem around the logos I used now appeared and looked awful.
    How do I fix? I'm frustrated and this matter is very time sensitive as there is supposed to be over 10,000 copies of this brochure printed by the weekend. Thanks in advance. : )

    a brochure that is mostly white text on black, with a few full colour pictures. There are also some manufacturer's logos that I inverted to make them white on black too, all in CMYK mode in PS ... the colours were completely off.
    The objects in the page are not colour managed coherently and correctly from the start. For instance, if you have Photoshop set up to disregard embedded ICC profiles, it will assign a default ICC profile for the colourant model of the object (a type PRTR Printer profile with data space CMYK for a CMYK colourant model object, and so forth), but it will not save out that object with the profile it assigned. This way you get what in the graphics model becomes 'deviceColor' meaning that the colourants are rendered by the numbers as there is no definition of the colours you intend them to form in the printing condition.
    Classical case is of a graphic designer who misconfigures or disables colour management in a page layout application, places deviceColor objects, generates PostScript or PDF, and wonders why the gray balance, the tonal range, the highlight detail, the shadow detail - is different in each and every tonal image in the page. Always, always, always unify the colour management for the page. Capture and correct in a large gamut RGB working space. Place three component RGB with correctly embedded source ICC RGB profile in pagination, and convert into one and only one destination ICC CMYK profile for the intended printing condition.
    The way you are working would produce similar problems in QuarkXPress and InDesign - it would not matter what make and model of page layout application you picked.
    Hope this helps,
    Henrik Holmegaard

  • Override save method in contribution mode

    Hello,
    I am working on SSXAapplication supported by UCM 11g + siteStudio with Jdev 11g.
    I have to override the method behind the save button comes in Contribution mode. I would be great help if you can tell me the file name where I can make my changes.
    Thanks,
    MAK

    Hi ,
    I think it would be wcm.contributor.js or wcm.sitestudio.form.js
    You can check the files under <MW_Home>/Oracle_ECM1/ucm/idc/components/SiteStudio/publish/resources/wcm/sitestudio
    Thanks
    Srinath

  • Creating Load and Save methods to save to a DOT file.

    I have to create methods to save to a file and load to a file but I am not sure how to do this. So I was wondering if I could get advice on how to do this, thank you.

    LR's support for video metadata is very incomplete, and it doesn't write out video metadata back to the video file or to XMP sidecars.  Please see and vote on this topic in the official Adobe feedback forum:
    Lightroom: Metadata applied to videos in Lightroom isn't available in other applications

  • Save method in ESS application

    Hi all,
    I have a requirement whereby I need to update a custom table after the user clicks the "Save" button in the standard ESS application. Does anyone know where I can insert the code ? I can't find the onEvent in the vc<>Review component controller
    Thanks in advanced.

    In the onEvent() method,      
    // if event is save, and the marital status has been changed, update notification table
         String event = fpm.getEventData().getEventName();
         if (event.equals(IFPM.EVENT_SAVE)){
              if(wdContext.currentSelectedInfotypeElement().getFamsa().equals("1") || wdContext.currentSelectedInfotypeElement().getFamsa().equals("2")){
                   if (wdContext.currentContextElement().getValTMBS()){
                        wdThis.wdGetFcPerFamilyHKInterface().updateNotificationTable();
         return true;

  • OLE - all methods of objects

    hi,
    1)I want to know all the methods/attributes of objects (which i use in SET/GET statement). where do i will find these?
    2) I am unable to add some text to a cell in a table in word document. i have used the following code.
    getting cell co-ordinates.
    call method of gs_table 'Cell' =  gs_cell
    exporting
       #1 = '1'  "1st row
       #2 = '1'. "1st column
    getting the range handle to write the text.
    get property of gs_cell 'Range' = gs_range.
    *Filling the cell.
    set property of gs_range 'Text' = 'OLE'.
    Any pointers in this regard will be of great help to me.
    Thanks in advance

    Welcome to SDN.
    the only way to know about all the methods, attributes is to use some external tool. i use VB6 for the same
    Regards
    Raja

Maybe you are looking for

  • Handling of empty file

    Hi my Scenario is Proxy to .CSV , when there is data  proxy is trggering and genarating the .csv file  this is working fine. but when i trigger  proxy without data it should create a empty file, but this empty file creating with special charecter. FC

  • I cant figure out how to sign up for one to one appointment

    I would love some direction on how to sign up for a one to one session or something like that, im working on an iphoto project involving garage band and im needing help.  this project is due fri morning I desperately need help

  • Computational search in hashtable

    Hi experts, I have the following situation. I have 25 apples and want to give away these apples to a list of people who need them stored in hashtable. Each of these people has indicated the quantity which they need. How to do give away exactly 25 app

  • This Connection is Untrusted - Vodafone website, issue only occuring with Firefox

    Finding Firefox is giving issues with any https://online.vodafone.co.uk/ url Other browsers aren't giving the same issue and Vodafone themselves weren't very helpful as they seem to think the browser is at fault. Any suggestions (that reasonably don'

  • Query- not to repeat  column value

    Hello, tried find the solution from the forum... but no luck ....if it repeation please excuse me. Data on the Table. ID       U_ID     NAME      100     1          AAA 100     3          BBB 200     1          CC 200     2          DDD 200     3