How to extract the content of a section using VBA?

For example, I have an article like this:
Abstract
AbstractParagraph1
AbstractParagraph2
Body
BodyParagraph1
BodyParagraph2
Reference
ReferenceParagraph1
ReferenceParagraph2
Knowing that Abstract, Body and Reference are all headings, which means if I click the triangle button on the left of the heading (For example, Abstract), AbstractParagraph1 AbstractParagraph2 will shrink or expand. So my question is: how to retrieve the paragraph
in a specific section using VBA?

Hi UW,
>> how to retrieve the paragraph in a specific section using VBA?
In my option, you could use the Section Object (Word) to get the section object, and then use the Section.Range Property (Word) to get the content of the special section. The links below might be useful to you.
# Section Object (Word)
https://msdn.microsoft.com/en-us/library/office/ff194295.aspx
# Section.Range Property (Word)
https://msdn.microsoft.com/en-us/library/office/ff836097.aspx
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.

Similar Messages

  • How to extract the content of a mail message?

    Friends,,,
    How to extract the content of a mail message?
    the message does not contain any attachments or images.
    its just a plain text..
    if i use message.getContent(), in addition of the content it returns headers information also...
    but i need only the content of that message...
    if i write code like this:
    String content = (String) message.getContent();
    it gives cast exception...
    if the message contains only plain text, no multipart, then which method is useful to extract only the content?
    please tell me friends..
    thanks in advannce,
    regards,
    Venkata Naveen

    Message.getContent() does not return headers for a simple text/plain
    message. If you're getting headers, something else is wrong.
    Also, casting the result to String should work.
    Most likely the message really isn't a simple text/plain message.
    Provide more details and we'll help you figure out what you're
    doing wrong.
    Also, please read the msgshow.java demo program included with JavaMail.

  • How to extract the contents of the Jar file?

    Hello,
    Can anyone tell me how to extract the contents of the Jar file?
    An example will be highly appreciated.
    Thanks.

    From command line, or from within a java application?
    Kaj
    Btw. Why do you need to do it. You do know that you can add jars to the classpath and read resources from them without extracting the file?

  • How to extract the contents of ZIP file stored in oracle database column ?

    The file is in ZIP format and it is stored in BLOB databse column . The contents of file is in binary format .
    How to extract those contents from file and thus creating the same ZIP file as output in ODI ?
    Thanks
    Arun

    Perhaps you can something like what is described in the support note "How To Load A PDF File Or Other Binary Files To a BLOB Column From ODI (Doc ID 1412753.1)"

  • How to extract the content of a user uploaded txt file in web dynpro?

    Hi,
    I'm working on a java web dynpro component. This component consists of document upload field, where users should be able to upload .txt documents. These uploaded text documents should then be somehow read, and thir content displayed. I am already able to upload documents using the upload field, and store it in the context, but I'm still not able to extract the content of these text documents for displaying.
    Does anyone have any suggestions of how I could do this?
    Any help will be greatly appreciated!
    Thanks!

    Hi Alain,
        You can do through this document on how to upload/download files in Webdynpro.
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081257f]
    Once you have the uploaded file in your context if you are storing it as a byte array then convert it to a string using the String constructor String(byte[] bytes)  and then you can store this string in an attribute of type String which could be bound to a UI element (TextArea) to display the contents.
    If you are using an IWDResource then you will get an inputstream from which you can read the data and convert it to a string for display as mentioned above.
    Hope this helps.
    Sanyev

  • How to extract the mouse cursor image without using JNI

    I want to get the image of the mouse cursor of the system using java. The Robot class captures the screen only, but the mouse icon image is not the part of the screen, so it is not easily detected. But we can get the mouse cursor position using API, but how to get the exact image icon, without using JNI. I don't want to generate my own cursor at that position.

    I am building a Remote Desktop kinda app using java..... I want the screen of the remote comp to be viewed on my screen and generate events from my machine to the remote machine. So, I am capturing the screen images of the remote machine. But the cursor is not part of the screen object. i want to extract the cursor image icon from the remote machine to my machine and render the image.

  • How to Extract the content of a message?

    Friends...My Message contains both body and attachments...
    But while extracting, it returns content (body text) as null..but body is there..
    attachments are coming properly...
    If attachments are not there, it display the content properly..
    im giving my code please check what s problem in that? please...
    Object obj = msg.getContent();
    if (msg.isMimeType("multipart/*"))
                 Multipart multipart = (Multipart) obj;
                 int       count     = multipart.getCount();
                 for (int j = 0; j < count; j++)
                        Part        part = multipart.getBodyPart(j);
                        String      sct  = part.getContentType();
                        ContentType ct   = new ContentType(sct);
                        if (ct.match("text/plain") || ct.match("text/html"))
                            System.out.println("The content is " + (String)part.getContent());
                        String disposition = part.getDisposition();
                        if ((disposition != null)
                                && (disposition.equals(Part.ATTACHMENT)))
                            System.out.println("File Name is " + part.getFileName());
    Sandhya Komali

    Your mail server could be broken. What protocol are are using -
    pop3 or imap? What server (what vendor) are you using?
    Can you post the protocol trace when accessing
    such a message?
    Also, you might consider using the Part.isMimeType method
    instead of ContentType.match, it will make your code simpler
    (but is unrelated to your problem).

  • How to extract the contents fo .xsl files

    wanna source code to extract and Modify the contents of .xsl files

    Duplicate of http://forum.java.sun.com/thread.jspa?threadID=635711&tstart=0

  • How to read the contents of images folder using AS3

    Hi,
    I'd like to load the images in the folder dynamically without using XML.
    Is there a mechanism in AS3 that enables me to read directly the content of images folder directly without using XML or should I use php to do that?
    Thanks

    Yes you can do that without XML. You need to use the Loader() class to dynamically load the images. Check the documentation of the loader class.

  • How to display the contents of servlet request using the swing component.

    I am trying using the servlet to receive the request of the J2ME client. When the request will be there, this should be automatically displayed by the swing User Interface. Again, that component should display the previous requests made alongwith this request.

    Shriprasad wrote:
    I am trying using the servlet to receive the request of the J2ME client. When the request will be there, this should be automatically displayed by the swing User Interface. Again, that component should display the previous requests made alongwith this request.This makes no sense. Either there's a lot you're leaving out (maybe you're receiving requests on a server, then storing data, and you want to expose the data later via a console of some kind implemented in Swing?), or you don't understand what you're talking about.

  • How to Extract the data from R/3 Genric extractor to BW ?

    How to Extract the data from R/3 Genric extractor to BW ?

    hi,
    step by step procedure for generic extraction delta
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    Refer:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    http://help.sap.com/saphelp_nw04/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Extractions in BI
    https://www.sdn.sap.com/irj/sdn/wiki
    New to Materials Management / Warehouse Management?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1b439590-0201-0010-ea8e-cba686f21f06
    Ramesh

  • How to Display the content of Excel file into Webdynpro Table

    Hi Experts
    I am following the Blog to upload a file in to the webdynpro context,but my problem is after uploading a excel file i need to extract the content from that Excel file and that content should be displayed in the webdynpro table.Can any body please guide me how to read the content from excel and to Display in the Table.
    Thanks and Regards
    Kalyan

    HI,
    Take for example, if Excel file contains 4 fields,
    Add jxl.jar to JavaBuild path and Use this snippet
    File f=new File("sample.xls");
    Workbook w=Workbook.getWorkbook(f);
    Sheet sh=w.getSheet(0);
    int cols=sh.getColumns();
    int rows=sh.getRows();
    Cell c=null;
    String s1=null;
    String s2=null;
    String s3=null;
    String s4=null;
    ArrayList al=new ArrayList();
    int j=0;
    for(int i=1;i<rows;i++)
    ITableElement table=wdContext.createTableElementz
         s1=sh.getCell(0,i).getContents();
         s2=sh.getCell(1,i).getContents();
         s3=sh.getCell(2,i).getContents();
         s4=sh.getCell(3,i).getContents();
                             table.setName(s1);
         table.setAddress(s2);
         table.setDesignation(s3);
         table.setDummy(s4);
         al.add(j,table);
         j++;                    
    wdContext.nodeTable().bind(al);
    Regards
    LakshmiNarayana

  • How to extract the audio of a zip file? if it helps I'm trying to add this album zip to my library

    how to extract the audio of a zip file? if it helps I'm trying to add this album zip to my library

    Let's say you have a zipped audio collection (audio.zip) containing mp3 files. And you are at a Terminal prompt.
    List the files in the zip archive
    unzip -l audio.zip (that is ell)
    Extract all mp3 audio files into a new home directory folder called mymusic
    unzip -d ~/mymusic audio.zip \*.mp3
    Variations of the above will depend the zip contents, and internal structure. If the zipped audio collection was gzipped, or someone used rar on it, then the extraction process will be different.

  • How to extract the actual XML document from soap message?

    My problem is " how to extract the actual XML document from soap message? "
    i just want to extract the attachment i.e. (pure XML document without any soap header or envolope).
    i could be ver thank full if u could solve my problem.
    [email protected]

    Hi,
    This is some skeleton code for extracting an attachment from a SOAPMessage.
    import javax.activation.DataHandler.;
    import javax.xml.soap.*;
    import javax.xml.message.*;
    Iterator allAttachments = message.getAttachments();
    AttachmentPart ap1 = null;
    while(allAttachments.hasNext()){
    ap1 = (AttachmentPart)allAttachments.next();
    //Check that the attachment is correct one. By looking at its mime headers
    //Convert the attachment part into its DOM representation:
    if(ap1.getContentType() == "text/xml"){
    //Use the activation dataHandler class to extract the content, then create a StreamSource from
    //the content.
    DataHandler attachmentContent = ap1.getDataHandler();
    StreamSource attachmentStream = new StreamSource(attachmentContent.getInputStream());
    DOMResult domAttachment = getDOMResult(attachmentStream);
    domAttachment holds an xml representation of the attachment.
    Hope this helps.

  • Is it possible to extract the contents of any PDF file using Adobe PDF SDK?

    Is it possible to extract the contents of any PDF file using Adobe PDF SDK?
    For Example: There is one pdf file. Let us say xxx.pdf with 32 pages. I am interested in only in a topic present at 10th page. Can I extract this information and save it into another pdf file (means new pdf file)?

    Thanks Irosenth,
    I am actually interested in extract the page and create a new PDF with that page. But still there is a catch that on which basis the page needs to extract either on PAGE number OR on Bookmark basis.
    But here in this scenario assume I am looking for the PDF file, now I want to save only page 5. How can I extract page 5 automatically/programmatuically? Or in simple word how can I get the reference link of page 5?
    Here I am not getting clear picture that Do I need both SDK Adobe & Acrobat to achieve this requirement. And more over you have mentioned that SDK itself is free. But on Adobe side it is mentioned that it is available by license only with this I have another doubt: To work my desktop/system application with Adobe PDF library, this library needs to distribute with the application. So in this case will it be chargeable for each and every deployment.
    Could you please provide me the link from where I can download the SDK? So that I can do some excerise with SDK to figure out the exact flow of functionality to work with my application.

Maybe you are looking for