Email word document as attachment

I have a template in word document with some variables and text in color, bold, grey etc. stored in UNIX directory.
My goal is to replace variable with customer name, number dynamically and then
send email this word document as an attachment in class cl_bcs.
How can I load this word document into internal table, search and replace the variable dynamically and email the document as an attachment without loosing the color, bold font etc.  I tried the approach Open dataset, read dataset, find and replace variable but when I send email ( using document type = 'DOC' and content as 255 char), I click on the attachment and the file was corrupted.
  Thanks for your input.

Hi,
You can try adding the attaching the content in HEX format. Refer to the below source code-
CALL METHOD document->add_attachment
            EXPORTING
              i_attachment_type    = ls_attachments-file_type
              i_attachment_subject = ls_attachments-file_name
              i_att_content_hex    = ls_attachments-attachx[].
Refer to this below links for an example-
http://www.divulgesap.com/blog.php?p=NTA=
http://www.divulgesap.com/blog.php?p=ODI=
Hope it helps.
Cheers,
Ravikiran

Similar Messages

  • Email Word documents to be stored on iWork for iCloud

    Is it possoible to email Word documents to be stored on iWork for iCloud?

    Yes. One way is to download the Word documents and drop them into your Pages for iCloud window (the one where all your files are shown and not a blank word processing page).

  • NEED TO IMPORT WORD DOCUMENTS AND ATTACH TO CLAIM

    Hi,
    We are trying to implement oracle trade management. In this after claims are created we are trying to make mass upload of word documents related to claims. Is there any API to achieve the same? I have searched Trade Management API's but none are available. Looking for a generic FND API atleast to import the word documents into system.

    Hi,
    Sorry to Bother you. I dont have answer to your query infact looking for some help from your end.
    Do you have any script which can explain how to call API "OZF_CLAIM_PUB.CREATE_CLAIM".
    It will be of great help for me.
    Thanks
    Sachin

  • Unable to send Word document as attachment to an email

    I have recently installed Microsoft Office Standard on my new laptap which runs Windows 7 Professional.  When i am in Word and trying to send the document as an email attachment, I received an error dialogue box with the message "Word couldn't send
    email because of MAPI failure: "Unspecified error"."  I clicked on the help button and have tried all the steps but no avail.
    The work around is to open Outlook and create an email with an attachment.  This works BUT I would like to be able to use Word as it was designed.  Anyone have a similar issue and suggested correction?
    Thanks!

    Here is a simple solution sure to work.
    1. Start
    2. Search for Winword
    3. Right Click Winword and choose properties ( I instead would choose open file location just to know where the rest of windows programs can be found. Once there, right click Winword again and choose properties.
    4. Click compatabilty tab
    5. Check run as administrator at the bottom
    6. Apply
    7. Do the same for all Office programs If so desired (on the same file location where you found winword just look for Excel, Powerpoint, etc. and make sure the file you choose is an application type file)
    Jic, it is not obligatory to apply the above solution for to all Office programs. You can do it just to the ones you want to send email from. If you only need Word to have this functionality just do it for Winword and thats it.

  • How do convert an emailed word document on my ipad?

    I have an ipad with "pages" I just purchased. How do convert worrd docx file to pdf or epub? The document has been emailed to me.

    I'm not sure if this is a Mac Pages question or an iWork for iPod question.  Do you have the Mac iWork? If so, open the docx file in Pages and export to PDF or epub.  If your question is about iWork for iPad, that discussion area is here:  https://discussions.apple.com/community/ipad/iwork_for_ipad
    Jerry

  • Word Document as Work Item Attachment

    HI All
         Can any body help me , how to pass a word document as attachment to a workitem (Activity Step)
    Thanks in Advance
    Pavan

    Purvesh Thank you  very much for giving me the alternative solution but, can you say me how can i programatically pass the attachment to the workflow
    may be from ABAP to Wrokflow conatiner element (&_ATTACH_OBJECT&)

  • OTM can not open attachment with Word Document(*.docx)

    With more and more use of Word Document(*.docx) (version 2007). OTM (Oracle Test Manager) can create an attachment with it, but can not open attachment with Word Document(*.docx). Is this a problem for anyone else? Any wok around?
    Thanks
    Katherine

    I am using OTM version 9.2 and the Word document (*.docx) attachment can be opened in this.
    For being able to open a docx file, try to attach an word document from the file option in the Requirements, Test or Issue tabs in OTM , once you upload the file, please check if location is " in Database" Else click update DB and upload the document.
    Once the attachment is attached to the Attachment section in the right pane, clicking on the attachment will open the *.docx document.
    This has worked for me.
    Hope this helps.

  • How can I get a word document onto my ipad

    I tried emailing myself a word document and opening it on my ipad. The tutorial says I should just be able to touch on the attachment, but I get the message saying it can't open the document.

    Per the iPad tech specs:
    Mail attachment support
    Viewable document types: .jpg, .tiff, .gif (images); .doc and .docx (Microsoft Word); .htm and .html (web pages); .key (Keynote); .numbers (Numbers); .pages (Pages); .pdf (Preview and Adobe Acrobat); .ppt and .pptx (Microsoft PowerPoint); .txt (text); .rtf (rich text format); .vcf (contact information); .xls and .xlsx (Microsoft Excel)
    What app generated the word document and what is the extension of that document?
    The iPad will open an emailed word document without any additional apps.
    David M Brewer wrote:
    You need an app on the iPad that can open a word doc. Pages is one app, $9. A free app called box.net can open word docs.

  • Automatic creation of MS Word Documents within a Report

    Dear Experts,
    within my report which creates automatically activities in a background process I have to create MS Word Documents and
    attach this Word Documents to the Activity.
    The Word Document does have a Logo and the text is changing with every Activity created.
    What would be the best technical solution for the creation of this word documents for my report?
    Best Regards
    Oliver

    Hello, I have found out what was the problem. In the end I have used method EDITREPLACE and not WW2_EDITREPLACE and I put the method EDITREPLACE more to the end of my ABAP Code:
    REPORT  z_prueba_oliver.
    TYPES: BEGIN OF ty_partner,
                 nif            TYPE bu_partner,
                 name_org1      TYPE bu_nameor1,
                 conting_com    TYPE c LENGTH 2,
                 fecha_efecto   TYPE zbufecha_ef,
                 END OF ty_partner.
    DATA:  lt_partner1     TYPE TABLE OF ty_partner,
                 ls_partner1     TYPE ty_partner,
                 lv_file_save_as TYPE c LENGTH 40,
                 lv_contador     TYPE n LENGTH 3.
    * Include necesario para la declaracion de objetos OLE2
    INCLUDE ole2incl.
    * Declaraciones para la llamada a WORD.
    DATA zword TYPE ole2_object.
    CLEAR zword.
    ls_partner1-nif = 'X7510034M'.
    ls_partner1-name_org1 = 'Razon Social 1'.
    APPEND ls_partner1 TO lt_partner1.
    ls_partner1-nif = 'X7510034M'.
    ls_partner1-name_org1 = 'Razon Social 2'.
    APPEND ls_partner1 TO lt_partner1.
    ls_partner1-nif = 'X7510034M'.
    ls_partner1-name_org1 = 'Razon Social 3'.
    APPEND ls_partner1 TO lt_partner1.
    ls_partner1-nif = 'X7510035M'.
    ls_partner1-name_org1 = 'Razon Social 4'.
    APPEND ls_partner1 TO lt_partner1.
    ls_partner1-nif = 'X7510035M'.
    ls_partner1-name_org1 = 'Razon Social 5'.
    APPEND ls_partner1 TO lt_partner1.
    LOOP AT lt_partner1 INTO ls_partner1.
      AT FIRST.
        CREATE OBJECT zword 'WORD.BASIC'.
    * Se abre el fichero que contiene la plantilla de la carta
        CALL METHOD OF zword 'FILEOPEN'
          EXPORTING
          #1 = 'C:DOCSPRUEBA_1.DOC'.
      ENDAT.
    * Se selecciona todo el texto del archivo PRUEBA_1.DOC
      CALL METHOD OF zword 'EDITSELECTALL'.
    * Se copia el texto seleccionado al portapapeles
      CALL METHOD OF zword 'EDITCOPY'.
    * Se crea un documento nuevo, al que WORD llama documento1
      CALL METHOD OF zword 'FILENEW'.
    * Se pega el texto del portapapeles a documento1
      CALL METHOD OF zword 'EDITPASTE'.
    * Posicionar al principio del documento
      CALL METHOD OF zword 'STARTOFDOCUMENT'.
    * Posicionar al principio del documento
      CALL METHOD OF zword 'STARTOFDOCUMENT'.
    * Se selecciona todo
      CALL METHOD OF zword 'EDITSELECTALL'.
    * Se borra la selección
      CALL METHOD OF zword 'EDITCLEAR'.
    * Se incorpora el texto original de PRUEBA_1.DOC
      CALL METHOD OF zword 'EDITPASTE'.
    *IF ls_partner1-conting_com is initial.*
       *CALL METHOD OF zword 'EDITREPLACE'*
        *EXPORTING*
        *#01 = '#linea2y3#'*
        *#02 = 'de la cobertura de Accidentes de Trabajo, de los siguientes código de cuenta de cotización (CCC):'*
        *#03 = 0*
        *#04 = 0*
        *#05 = 0*
        *#06 = 0*
        *#07 = 0*
        *#08 = 0*
        *#09 = 0*
        *#10 = 1*
        *#11 = 0*
        *#12 = 1.*
    *else.*
         *CALL METHOD OF zword 'EDITREPLACE'*
        *EXPORTING*
        *#01 = '#linea2y3#'*
        *#02 = 'de la cobertura de Accidentes de Trabajo y Contingencias Comunes, de los siguientes código de cuenta de cotización (CCC):'*
        *#03 = 0*
        *#04 = 0*
        *#05 = 0*
        *#06 = 0*
        *#07 = 0*
        *#08 = 0*
        *#09 = 0*
        *#10 = 1*
        *#11 = 0*
        *#12 = 1.*
    *ENDIF.*
      *CALL METHOD OF zword 'EDITREPLACE'*
        *EXPORTING*
        *#01 = '#codprov#'*
        *#02 = ls_partner1-nif*
        *#03 = 0*
        *#04 = 0*
        *#05 = 0*
        *#06 = 0*
        *#07 = 0*
        *#08 = 0*
        *#09 = 0*
        *#10 = 1*
        *#11 = 0*
        *#12 = 1.*
      CALL METHOD OF zword 'EDITREPLACE'
        EXPORTING
        #01 = '#nomprov#'
        #02 = ls_partner1-name_org1
        #03 = 0
        #04 = 0
        #05 = 0
        #06 = 0
        #07 = 0
        #08 = 0
        #09 = 0
        #10 = 1
        #11 = 0
        #12 = 1.
    * Se reemplaza el campo #nomprov# con el valor de la tabla interna.
      CALL METHOD OF zword 'EDITREPLACE'
        EXPORTING
        #01 = '#FECHA_EFECTO#'
        #02 = '10 de Junio de 2010'
        #03 = 0
        #04 = 0
        #05 = 0
        #06 = 0
        #07 = 0
        #08 = 0
        #09 = 0
        #10 = 1
        #11 = 0
        #12 = 1.
      lv_contador = lv_contador + 1.
      CONCATENATE 'C:DOCS' 'PRUEBA' lv_contador '_' sy-datum '.DOC' INTO lv_file_save_as.
    * Se cierra el documento activo, documento1 con opción de salir sin salvar
      CALL METHOD OF zword 'FILESAVEAS' EXPORTING #1 = lv_file_save_as.
    * Se cierra el documento activo PRUEBA.DOC con opción salir sin salvar
      CALL METHOD OF zword 'DOCCLOSE' EXPORTING #1 = 2.
      AT LAST.
    *   Se cierra WORD
        CALL METHOD OF zword 'APPCLOSE'.
    *   Se libera el objeto ZWORD
        FREE OBJECT zword.
      ENDAT.
    ENDLOOP.

  • Open several word documents

    In SolMan (Solar01), MS Word documents are attached to the documentation tabs, and can be opened, edited and saved. But appearently only one document can be opened at the time, and if you navigate to another place in the structure than where you opened the document, the Word document you just opened goes blank and you loose any changes you might have made.
    An example:
    You have a business process in the structure which is called "General Ledger", with some Word documents placed on the Project Documnentation Tab. You open one of the Word documents, and then navigate to another node in the structure - fx. "Accounts Payable" and switches back to the Word window. Now the Word document has gone blank.
    Is there some way to set up Solution Manager so that several documents in the structure can be opened at the same time (multiple Word sessions), and ensure that the documents open does not go blank when navigating to another node in the structure.
    Regards
    Lars

    Hello Lars,
    there is no possibility to edit several documents in SolMan at the same time in one mode. At the moment an open document is closed when you navigate to another node but if you have done changes to this document you will get a popup which asks you to save those changes. So you do not loose any changes to the document, if you do not want to loose them.
    I see two workarounds:
    1.you could open solar01 in another window and open the second document there
    2. you could use the checkin/checkout functionality and work with the documents locally
    Best regards
      Jürgen

  • Weblinks in my Mail client and in Word documents stopped working

    Hello,
    I am struggling to fix this issue. Out of the blue, hyperlinks in emails, word documents, skype, etc stopped working. Clicking on them usually takes me to Firefox, my default browser, but nothing happens usually. At other times a page opens which is NOT the page that should have opened but another one, that I used in the past. I can copy and paste the links into the browser and open them without problems. Also, the touchpad works perfectly in every other sense. Clicking on things within Firefox itself works without problems .. pages open fine.
    I really have no idea what's going on as the problem started out of the blue ...
    Any ideas?
    Pavla

    Pages is much more for desktop publishing than word processing. I produce flyers and advertisers for my business and have found Pages much easier and more versatile than Illustrator or Word. Never have tried Pagemaker, which I understand to be one of the premier DTP applications from days past.
    Oh... I forgot to say, you can actually have multiple Inspectors for the same document too.
    When ever I am working with multiple Pages documents, being that I am using a MacBook, I make extensive use of Spaces, with different documents occupying different Spaces. Give it a try sometime. You might like it.
    Good luck and have fun discovering what Pages can & can NOT do for you.
    And come back soon.
    Adam

  • TS1506 how do i save a word document attached to an email to my iphone

    I am trying to save a word document from an email to my iphone 4s.
    I have looked on all of the support pages and have found that word . doc is supported but cannot see how i can save it in any way?
    I have followed all guidelines but now it is making it hard to either attach a document to my email and save them

    In order to save any type of document on your phone you need to have an app that supports that form of document.
    There are several word processing apps but I prefer Pages.  Buy this app. Once it is on your phone you can tap the Word document in your email to view it then tap the Share icon and Open in Pages.
    If you edit the document and email it you will have the choice to send it as a Pages document, a Word document or a PDF file.

  • How at send a Word document as an email attachment from an ABAP program?

    Hi all,
    i got request to develop background run program which check which staff is due CONFIRM and able to attach confirmation form (Microsoft Word file) to HR and CC staff manager as recipients.
    I try almost all relevant FM but still face problem below, please assist.
    1) FM SO_DOCUMENT_REPOSITORY_MANAGER
    - A window pops up requesting Recipient email ids. I couldn't get the window suppressed.
    2) FM SO_NEW_DOCUMENT_ATT_SEND_API1
    - Since the attachment is a pre-formatted Word Document and not an Excel or Text document, couldn't process the contents into the internal table (most sample in forum is Excel not word)
    Appreciate ABAP folks who have sample code attach a word file will help on this.
    Thanks and regards,
    Felicek

    Hi ,
    sorry for my request but I have to send an e-mail with word attachment and I would appreciate if someone could give the code for
    the first part of this link: http://www.divulgesap.com/blog.php?p=ODI=
    (I mean 'ZDIV_SEND_EMAIL' ) . The problem is that I have to load in an internal table the file word (by using "open dataset in binary
    mode" I suppose ) and then pass this table to a FM or a method for sending e-mail with this file WORD but I 'm facing some
    problems....  any suggestion would be very appreciated ... I'm in a "impasse"  ! It's seems there is no way out !!!
    Thanks in advance
    Andrew

  • Word Documents attached to email

    I am running sun ONE messanger latest patches and my problem is as follows:
    I have an email with a Word document attached ... I get an error when I try to open the attachement if I view the message in IE6 ... this issue is reproduceable every time across multiple versions of the OS. I can open the attachment in mozilla, firebird, netscape and opera on the same machine. I can also open the attachment in Outlook ....
    Does any body know what microsoft has done that stops the attachment from opening ... other attachments ... visio, pdf, txt, xls all open
    I feel like the guy that goes to the doctor and says ....
    Doctor it hurts when I do this
    and the doctor replies
    Then don't do that.
    I would be happy if IE disappeared from the planet but my boss lives in the browser and wants his word attachemnts to open up

    Right you are and thats why I am here because I only see this behaviour in Sun ONE Message Server (iMS) ... To test this I have created a web page like this
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    This is a test <BR>
    junk.doc
    </BODY>
    </HTML>
    I can in IE6 go to this page and click on the link which then opens word and loads the document junk.doc .... so this is an issue of something that the http server in iMS is doing. I was wondering if anyone else on this forum has encountered this problem. Is this an issue of the iMS server seting the Content Expiration in the HTTP headers? Does microsoft deliberatly sabotage the download because it is coming from iMS?
    This behaviour appears in all IE6 browsers on several versions of windows. Could somebody else in the Forum run a check against their iMS and see if this is an issue across the board?

  • Transfer Word Document Email Attachment from my iPhone to My Computer

    How can I transfer a word document attached to an email on my iPhone to my Desktop Computer?

    "Both connected to the same WiFi" is where the problem lies. I am often out of the house and away from an internet connection. I have the same problem - I know I have received the email with the attachment, as my iphone tells me, but I cannot get it onto my Mac in order to edit the file and send it back again. My problem is more to do with excel files (where you cannot see anything other than the first page of the workbook), but is basically the same problem.
    Will some techno-genius please tell me if buying and carrying a second wireless router in my computer bag will solve the problem? This would enable both devices to be on the same wifi network, and then the app called WePrint would work. It thinks it can work over a peer to peer network.....but it doesn't. It only works over a proper wireless network.

Maybe you are looking for

  • I want to escalate a complaint about Adobe 'Customer Service'

    Last year I perfectly legitimately bought a second hand copy of Creative Suite 5.5 Design Premium. I have successfully installed it and have been using it perfectly ever since. However, I asked the original purchaser of the software to transfer all o

  • PC hard drive wiped out, how do I transfer to new one?

    Our home PC (running Windows XP) had to have it's hard drive replaced, therefore I lost everything I had on itunes (I know, I know, I should have had it all backed up!). I spoke to a great guy on the helpline, who told me how to at least get all my p

  • Request Response Bean for SOAP Sender Adapter

    Hi Friends, Is it possible to use  Request Response Bean Module described (FIle to RFC to File here) for SOAP(sender) and JDBC(receiver) adapter? I want to configure SOAP to JDBC to JDBC scenario. http://wiki.sdn.sap.com/wiki/display/HOME/UsingReques

  • How to add environment variable programmatically??

    Hi all, I want to add TOMCAT_HOME environment variable programmatically. How can I do this? Is there any dos command to set an environment persistently? Pls help guys... Thanks in advance Mithunk

  • Using XML

    Hi, Now i am flash actionscript programmer for 10 months. Now I am trying to learn flex. So i would like to know how can i parse the xml in flex. Can anybody help me? Thanks and regards,                     Sreelash