How to use saveas webarchive in word using OLE2

Hello,
I am using the webutil word demo (without webutil) on the client. This demo is working fine.
Now I like to save the file not as a word document, but as a WebArchive or html file. How can I pass the fileformat argument to the saveas invoke call. Or is there a other way to do this using ole2.
Below the demo code.
Thanks in advance,
Fred.
DECLARE
app OLE2.OBJ_TYPE;
docs OLE2.OBJ_TYPE;
doc OLE2.OBJ_TYPE;
selection OLE2.OBJ_TYPE;
args OLE2.LIST_TYPE;
BEGIN
-- create a new document
app := OLE2.CREATE_OBJ('Word.Application');
OLE2.SET_PROPERTY (app,'Visible',1);
docs := OLE2.GET_OBJ_PROPERTY(app, 'Documents');
doc := OLE2.INVOKE_OBJ(docs, 'add');
selection := OLE2.GET_OBJ_PROPERTY(app, 'Selection');
-- insert data into new document from long item
OLE2.SET_PROPERTY(selection, 'Text', 'this is a test message');
-- save document as example.tmp
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'c:\example.doc');
OLE2.INVOKE(doc, 'SaveAs', args);
OLE2.DESTROY_ARGLIST (args);
-- close example.tmp
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 0);
OLE2.INVOKE(doc, 'Close', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.RELEASE_OBJ(selection);
OLE2.RELEASE_OBJ(doc);
OLE2.RELEASE_OBJ (docs);
Using OLE Commands
OLE2.INVOKE(app,'Quit');
END;

Hi Fred,
Word's SaveAs() method takes file format as it's second argument. The following code snippet shows how to save as HTML:
  args := OLE2.CREATE_ARGLIST;
  OLE2.ADD_ARG(args, 'c:\example.html');
  OLE2.ADD_ARG(args, 8);
  OLE2.INVOKE(doc, 'SaveAs', args);Eric Adamson
Lansing, Michigan

Similar Messages

  • Help!!! Can Anybody tell me how to read bookmarks of MS word using ABAP?

    It took me around 3 days , but there is still no solutions...
    Can Anybody tell me how to read bookmarks of MS word using ABAP ?
    Many thanks.

    Dear Nick  ,
    Thanks for your attention!
    I have MS word installed in the R3 server , and I uploaded my word doc with some self-defined bookmarks into SAP R3 system.
    Now I want to read these bookmarks using ABAP in this R3 system...
    Is it clear enough?
    Looking forward to your solution ...
    Thanks again..
    Best Regards,
    Leon.

  • After i convert a pdf to word doc, how do i save it in Word so i can change?

    after i convert a pdf to word doc, how do i save it in Word so i can change?

    A "picture".
    Be well...

  • How do I save bookmarks from word to pdf?

    How do I save bookmarks from word to pdf?

    Eustace Mendis wrote:
    Not convinced it can't be done... but then I'm not sure I understand exactly what you want to do.
    I believe what the original poster wants to do is preserve the bookmarks of a Word file into the interactive bookmarks feature of the PDF specification, so that the bookmarks appear as a clickable linked table of contents when that Word file is converted to PDF. You see this in every ebook or iBook. This is easy to do when converting Word to PDF in Microsoft Windows, but I am not sure it is possible from Mac Word because everybody complains about it on the Mac side.
    Converting bookmarks to a clickable PDF TOC is easy to do in other software on the Mac, like InDesign. Apple Pages might do it too, but I'm not sure.

  • Using 'save as' in word 2007 corrupts a field in rtf template

    I am working on a cheque template using Word plug-in (Word 2007).
    I have created a number of fields to display the micr line. Examples of 3 of these fields are below. I am using micr mt font 12pt to display the micr line.
    <?if@inlines:PaymentAmount/Currency/Code='CAD'?>
    <?xdofx:'C' || lpad(PaymentNumber/CheckNumber,8,'0') || 'C'?>
    <?end if?>
    In most cases, if I make a change to the template and preview as pdf (which automatically triggers a save), the output of the micr line is fine.
    If I make a word only change (i.e add a carriage return) or if I use 'save as' (i.e. when I am making a back-up of the template with a different name) and preview using pdf, the Micr line does not display properly. Instead of the micr line, I see the text from the field itself (i.e. <?end if?>) displayed in micr mt font which means a bunch of boxes and other strange characters.
    It isn't just the preview output that is broken. If I generate and compare the actual xsl-fo stylesheet, there is a section missing in the broken version, and it is replaced by the strange characters.
    If I go in and re-enter the code into the fields, everything is fine again until I save using 'save as' or preview after a minor 'word only' type change such as a carriage return.
    Has anyone else experienced this?
    Thanks,
    Tam

    This does not sound right.
    I highly recommend you to report this to Oracle Support (open a SR).
    Include:
    - The product version (5 digit number)
    - Include steps how to reproduce the issue (if possible with screenshots)
    - Include example (either RTF and XML file and steps to reproduce).
    Give no excuses to Oracle Support to come back with a vague answer
    it seems you have found a bug.
    cheers
    Jorge

  • How do I save composed email for use indefinitely

    I am trying to compose one email with Mac Mail 7.2. That I am going to be using for a lot of  emails to be sent out in the future. I would like to know. How do I save that composed emai,  so I don't have to keep retyping thet same email over and over?

    Tam, make note of CT's post and try it out.
    Also, Word is just weird on the Mac...
    Have you tried Copy/Paste from Pages? Notes?
    They do work and preserve images when moving between docs/email
    What format is the image?

  • How can I save an "effect" and use it later as a default in my timeline

    I created a splitt screen. Now a want to reuse this effect later in the timeline. How can I save this effect?
    The same goes for titels. I arrange my own titels and want to reuse them later in editing again. So that I Only have to change the words and not all of the arrangement I mad.
    I also miss a featured titel that can stretch across the screen. Most titelsonly offer a limited space for the text.
    Thy
    ANDY

    Good morning Tom,
    re: titels.
    your are right, I can make the titels as big as I want, but not as long as I want.
    Do you have an idea how I can work around this.
    re: effects
    how can a copy the splitt screen effect from the timeline (as a compound clip) to the event browser (I suppose that is the window on the top left with all the event clips)
    PS. sorry I live in AUstria and use the German version.
    Thanks for your help
    ANDY

  • How to suppress Save As dialog when using the Close button on an editable pdf

    Environment: Windows 7, SDK 9, Adobe Acrobat Pro X, Visual Studio 2010 Professional
    Summary: when a document is opened for editing using automation, edited, then closed using the "Close" button, the confirmation dialog appears, "yes" is selected and then the "Save As" dialog appears.  It should save without the "Save As" dialog in the same way it does were the document opened from Adobe Acrobat directly.  My question is, is there any flag to set which governs whether the "Save As" dialog appears as part of the close document process.  It is behaving as if the document is read-only upon close. (it isn't)
    This is how the document is opened from C++:
    if(SUCCEEDED(hr = ::CoCreateInstance(__uuidof(Adobe9::Acrobat::CAcroAVDoc), 0, CLSCTX_ALL, IID_IUnknown, (void**)&pUnk))){
    hr = OleRun(pUnk);
    if (SUCCEEDED(hr)){
    if (SUCCEEDED(hr = pUnk->QueryInterface(&pAVDoc))){
    hr = pAVDoc->Open((BSTR)CComBSTR(strPath), strDocName, &bRet);
    Even when the plugin is removed from the plug_ins\AcrobatSDK directory, the behaviour is the same.
    Another reproduction is running the BasicIacVC sample, commenting out all lines from gAcroPdDoc->Close(); in InitInstance() and returning TRUE.  If an editable document is opened using the sample, edited then closed using the "X" button, the confirmation dialog is followed by a "Save As" dialog as if it were a read-only document which it is not.
    Any suggestions would be appreciated.
    Regards,
    Evan

    Yes, it does.  (as long as the pdf has been opened via a COM interface)

  • How to create SAVE button in Workbook using BI IP Functionality

    Hi All,
    I have Real-time Infocube (ZCUBSDID) with me. Planning has been done on the cube using BI-IP (like Aggregation level, filter, planning function and planning sequence are present there).
    As an Input i have everything in Quality system like I can access query in Bex Anlyzer (Input Ready Query) and also i have workbook associated with the query. SAVE button is also present on workbook which is giving result based on fiscal year and version.
    Now my task is to create workbook on Development system with the same functionality as Quality System.
    I have same Query available on DEV system also. I created new  Workbook but SAVE button is not available in my workbook.
    Can anyone suggest how to create SAVE button in my new workbook.
    I am new in IP side so please let me know if i can get any help from workbook which is already present in Quality system.
    Which type of analysis i should do to come out with solution.....otherwise let me know step by step procedure to create SAVE button on workbook using BI-IP functionality.
    It will be great help. My advance thanks goes to you people.
    Thanks,
    Rupali Singh

    Check points 19 & 20 on this link http://help.sap.com/saphelp_nw2004s/helpdata/en/43/a033e0f56e21b5e10000000a1553f6/frameset.htm.
    Command to be called on SAVE button is SAVE_AREA as explained in the point 20.
    Regards,
    Deepti

  • How do i save an audio file using quick time?

    How do i save a audio file from quick time. When I looked it up I was told to go to file on quick time and click on save as but my quick time has no save as to click on in file. What Now?

    How do i save a audio file from quick time. When I looked it up I was told to go to file on quick time and click on save as but my quick time has no save as to click on in file. What Now?
    You need to explin your workflow better.
    The "Save" action may be initiated by a "Share" or "Export" option depending on the app you are using. For instance, QT 7 Pro has "Save", "Save As...", "Share...", "Export...", and "Export for Web..." options depending on what you are specificly trying to do. On the other hand, QT X may have "Duplicate", "Export...", Export To", and/or "Share" options for various goals.
    Are you trying to record a new audio file using a mic, extract and save an audio track from a video, export audio from a video file, save an internet audio file that opened in the QT player, save an online audio file, etc?

  • How can i save and download word documents on my ipad without the pages app

    Need to know how to save documents on my ipad so i can share the same version of documents between my computer and my ipad on the same network. I do not have the pages app. and Most of the documents are either pdfs of word docs. so need to be able to save them on ipad and retrieve them when i am on the move. Pls help?

    You have to have an app on the iPad that is compatible with the particular file type that you want to save, edit or share. You can look at any of the word processing apps - Pages is one, Documents to Go, Quick Office Pro - but you have to have one like that in order to save and edit Word files.
    With pdf files - iBooks will work to save them - but that's all. Other apps like GoodReader will let you annotate them.
    You have to decide which app will serve your needs best and them download them in order to save, edit and share those file types.

  • How to set tabstops in MS Word using the LabVIEW Report Generation Toolkit

    Using the Report Generation Toolkit of LabVIEW, I need to set multiple tabstops that very in distance in MS Word.  I also have different sets of tabstops that I use and re-use at different times in the same report.  Is there a way to set the tabstops under program control?  I searched through the various VIs and found that there is a property ("Tabstops", "Word.Tabstops") in the _ParagraphFormat property node that refers to tabstops.  I found it in the Word Format Paragraph (adv) VI.  Unfortunately, I could not determine how to use it.  Any suggestions?  Is this an operational element?

    Bluebell,
    Sounds like you've already done some fantastic work to expose the various properties and methods of MS Word. It took me about 20 min before I could find the specific property that you were talking about! I found it under Word.Document>>Paragraphs>>Tabstops>>Add. There is a position, alignment and leader parameter that you can set from this property node. I've found that the best way to discover what these parameters do is to simply experiment. You could also try using the macro recorder in Word, perform the specific task, and then look at the code generated. I'm guessing that position sets the position of the tabstop itself. It sounds like your application is really specific. For such a specific task, I think I'd write a macro and call that macro from LabVIEW.
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • How to create file folder in word using iMac

    Hi, How can I create a new file folder in mac using an imac

    To do it in the Finder, open the enclosing folder, choose New Folder from the File menu, or control-click the window and choose New Folder, or press the Shift, Command, and N keys.
    To do it from a Save dialog box, push the button with the triangle if needed and then click the New Folder button.
    (103873)

  • In Numbers, how can I save a filter sequence using Reorganize?

    I'm using Numbers (from iWorks 9) and have a filterning sequence that involves a date range and finding specific values in a text column.  It's pretty straightforward to use the Reorganize button, but my macro program (QuicKeys) can't seem to negotiate the nested pull-down menu selections, so is there a way to save this sequence within Numbers?

    File menu, Export. Select Excel as the format.

  • How do I save regu;ar;y used sites as in Favourites on Explorer?

    I have just come to Firefox and two issues arise in use. How do I retain regularly used web addresses, like banks, travel co, etc. In explorer there is a category called favourites that do not appear in the history file.
    Also I do not see a secure sign like a padlock when accessing the supermarket Waitrose .com with firfox but it appears with explorer is this a problem.

    See here: https://support.mozilla.com/en-US/kb/how-do-i-use-bookmarks?s=bookmark&r=0&as=s

Maybe you are looking for

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that

  • Images in JApplet

    Hi! I am trying to convert a game application, made using Java - Swing combination, to an JApplet. First I installed the newest JRE1.3.1 from the java.sun.com and used the HTMLConverter. Testing revealed that the JApplet runs quite Ok in the Appletvi

  • Error while monitoring the Info Package

    Hi, While monitoring the info package, I'm having the following errors:(The data source is of type standard R3 Datasource). " Error when updating Idocs in Source System Diagnosis Errors have been reported in Source System during IDoc update: System R

  • Error 100 with adobe download assistance..

    Error 100 with adobe download assistance..unable to sign in to use the adobe acrobat software..i am not having any network issues..

  • Link Target, Code Snips and Nag-Screens?

    I shelled out the cash to buy a copy of iLife '06 so I could get iWeb. I quickly found that it was missing the ability to specify targets in links, this is an incredibly basic feature that iWeb is strangely missing. Without it iWeb sites aren't frame