Get TOC based on Paragraph section filtered on keywords

Need to get the Table of Contents for those whose Paragraphs for all the keyword/s that are supplied as search parameter are met.
E.g: Search for Keywords like 'Documentation', 'Analysis' - This will get all the Table of Contents whose subsequent paragraphs has the keyword Documentation or Analysis in them.
Then on selection of that particular Table of Contents (filtered list based on the searches) should display the complete section / paragraphs for that Table of Contents.
Please suggest.

In your link, it appears you want three elements from the document, viz:
TOCNum, TOC, Description
for which an example is:
Toc409454824, 1.1 Alumina, Aluminum oxide
Your 'TOCNum' entry (Toc409454824) is just the bookmark name applied by the TOC field to the corresponding entry '1.1 Alumina'. These bookmarks IDs are quite ephemeral and are liable to change every time the TOC is refreshed. I wouldn't be inclined to place
too much reliance on them.
Your 'TOC' appears to reference a paragraph in Heading 2 Style, containing the text '1.1 Alumina'. It is quite easy to build such a list, perhaps the simplest method being to insert a TOC field and convert its output to text. One can retrieve the
TOC bookmarks at the same time. For example, you might use a macro coded like the following to insert the list at the end of the document:
Sub CompileTOCRefs()
Application.ScreenUpdating = False
Dim RngTOC As Range, StrBkMkList As String, i As Long
With ActiveDocument
  .Range.InsertAfter vbCr
  Set RngTOC = .Paragraphs.Last.Range
  .Fields.Add Range:=RngTOC, Type:=wdFieldEmpty, Text:="TOC \o 2-9 \h \n", PreserveFormatting:=False
  With .TablesOfContents(ActiveDocument.TablesOfContents.Count)
    For i = 2 To .Range.Fields.Count
      StrBkMkList = StrBkMkList & "|" & Split(Trim(.Range.Fields(i).Code.Text), " ")(2)
    Next
    Set RngTOC = .Range
  End With
  RngTOC.Fields.Unlink
  For i = 1 To UBound(Split(StrBkMkList, "|"))
    RngTOC.Paragraphs(i).Range.InsertBefore Split(StrBkMkList, "|")(i) & vbTab
  Next
End With
RngTOC.InsertBefore "TOCNum" & vbTab & "TOC" & vbTab & "Description" & vbCr
Application.ScreenUpdating = True
End Sub
It is not apparent where in the document your 'Description' text comes from, so I can't comment yet on how you'd retrieve that.
Cheers
Paul Edstein
[MS MVP - Word]

Similar Messages

  • When I click "about this mac" to check on my storage, I get a number of different sections music, movies, etc. but also I get a section called backups, where can I find the files in this section?

    When I click "about this mac" to check on my storage, I get a number of different sections music, movies, etc. but also I get a section called backups, where can I find the files in this section?

    Welcome to Apple Support Communities
    All the storage in "Backups" is taken up by local snapshots, which are made automatically in all MacBooks, MacBooks Pro and MacBooks Air with OS X Lion or newer and Time Machine turned on.
    See > http://pondini.org/TM/30.html I recommend you to leave them there, because they will be removed automatically. However, if you want, you can disable or remove them manually if you want, even if there's no reason to do this. Have a look at the link above for more information

  • Getting blank space after paragraph in RTF template

    Hi there,
    Thanks so much for all your help for your help.
    I am running into one issue in RTF template, wanted to share with you to get any input on this. I have paragraph and Idid put in table at the top and there is xml tag that gives names after that paragraph. but I get blank spaces after paragraph and it shows names from that xml tag.
    I tried to remove spaces by deleting between pargraph and xml tag<name> , still i get blank page between paragraph text and names.
    Can anyone help me or point me to get it resolved that would be greatly appreciated.

    Thanks Varma for your prompt response and your time on this. I am still trying to get any other options to get this done as that is the requirement and with that blank page looks not fully satisfied for users and am trying any other ways to do implement this..
    That's the reason I thought of putting this post again to get more inputs that may have.
    Can anyone put some light onthis.
    Thanks a lot..
    sk

  • Can't get version based downloads to work

    I am new to JNLP and trying to get version based downloads to work. I have read everything I can find, but I still seem to be missing something. My setup:
    Tomcat 4.1.18 (running in JDK 1.4.0)
    Java WebStart 1.2
    Win 2k
    files in .war
    -launch.jnlp
    -+1.0
    |-testapp.jar
    |-version.xml
    -+images
    |-Save.gif
    -+META-INF
    |-MANIFEST.MF
    -+WEB-INF
    |-+lib
    | |-jnlp-servlet.jar
    |-web.xmllaunch.jnlp
    TS: 2002-04-23 19:21:05
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="$$codebase" href="$$name">
       <information>
          <title>ljtest 1</title>
          <vendor>Lance</vendor>
          <description>just an example</description>
          <icon href="images/Save.gif"/>
       </information>
       <resources>
          <j2se version="1.2+"/>
          <jar href="1.0/testapp.jar" version="1.0"/>
       </resources>
       <application-desc main-class="Main"/>
    </jnlp>version.xml
    <jnlp-versions>
       <resource>
          <pattern>
             <name>testapp.jar</name>
             <version-id>1.0</version-id>
          </pattern>
          <file>testapp.jar</file>
       </resource>
    </jnlp-versions>web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
        "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
      <web-app>
         <servlet>
            <servlet-name>JnlpDownloadServlet</servlet-name>
            <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
            <init-param>
               <param-name>logLevel</param-name>
               <param-value>DEBUG</param-value>
            </init-param>
         </servlet>
         <servlet-mapping>
            <servlet-name>JnlpDownloadServlet</servlet-name>
            <url-pattern>*.jnlp</url-pattern>
         </servlet-mapping>
      </web-app>Things I have discovered (possibly in error?):
    1) I do not need to include the jaxp.jar and parser.jar files because I am using JDK 1.4
    2) I do not need to change my testapp.jar to testapp_V1.0.jar because I have included the the version.xml file in the 1.0 directory
    I keep getting the following error in WebStart when I loadup the jnlp:
    JNLPException[category: Download Error : Exception: null : LaunchDesc: null ]
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.getDownloadSize(Unknown Source)I can get everything to work without version based downloads. Does anyone have any clue what I am doing wrong?
    Lance

    I found my own error. After loading up sun's reference implementation server in NetBean's debugger I noticed that it was only handling .jnlp files. Going back to the "Packaging JNLP Applications in a Web Archive" document I found my mistake. My web.xml files should have looked like this.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
        "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
      <web-app>
         <servlet>
            <servlet-name>JnlpDownloadServlet</servlet-name>
            <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
            <init-param>
               <param-name>logLevel</param-name>
               <param-value>DEBUG</param-value>
            </init-param>
         </servlet>
         <servlet-mapping>
            <servlet-name>JnlpDownloadServlet</servlet-name>
            <url-pattern>*</url-pattern>
         </servlet-mapping>
      </web-app>The difference being the <url-pattern> tag. It now tells the web server to handle all files not just .jnlp.
    This allowed me to download version based jnlp entries. I still can't get jarDiff things to work, but I will keep banging my head against the wall till I figure that out.
    Lance

  • Getting the ROWCOUNT of a section

    HI
    I have a report with four section--North,South,East,West!
    In all those section, i have to columns customer name a revenue.
    I want the section with maximum number of rows to appear first and then the next highest second..like this in descending order depending the number of rows that each section has!
    Can you please guide me about how do i go about this as the CountAll doesn't seems to be working in webi and once get the rowcount of all section can i sort the section on basis of rowcount to get the result.
    Any answer will be highly appreciated!
    Many Regards
    Rahul

    Hello Rahul,
    OK I have taken a closer look at the workflow I followed and I still think that you will be able to achieve what you need to do.
    Firstly I am using XIR2 SP4 (just incase it makes a difference)
    I assume that your report returns a transaction ID (or invoice number) that allows you to identify each individual row of data.
    On that assumption you need to do the following:
    Create a table with 3 columns: Customer, Transaction ID, Revenue
    Select the transaction ID column and add a count to the bottom of the table.
    Drag the footer cell with the transaction count off the table and drop it somewhere in the section - this will create a cell with the count within it.
    Right click on the new cell and apply the descending sort.
    Finally delete the transaction ID column from the table
    I do not know why you cant add a sort to a stand alone cell but you seem to be able to apply a sort if the cell is dragged from the table footer.
    Let me know if this works - I have used this process to create a WebI report using efashion, so I am pretty sure it will work.
    Regards,
    Mike
    Edited by: Mike Churchill on Jun 26, 2008 5:03 PM

  • Calculating Grand Total based on the section totals

    Hi,
    I have a webi report with a section. Outside the section block I have a grand total block. I have a section on Shop Names. At the total level I calculate calls per hour average. So at the end of each sections the total would look like
    Shop 1
    Shop 1 Calls : 61
    Shop 2
    Shop 2 Calls : 45
    I need to calculate call per hour at the grand total ...which should average the totals in the section
    Grand Total : 61+45 = 106/2=53. I needed guidance as to how based on the section totals I can write a formula to calculate averages of the values present in the section. Both are different blocks ( Section and Grand Total)
    I cannot write a direct formula as it will give me error caculation beacuase of the nature of data in the report.
    Please let me kow on this.
    Thank You,

    Hi BOCP-BOE ,
    Thank you very much for the quick response.
    I tried with          
    =Sum([V_Calls_Per_Hour_Average]) ForAll ([V_Calls_Per_Hour_Average]) In Report
    =Sum([V_Calls_Per_Hour_Average]) ForEach ([V_Calls_Per_Hour_Average]) In Report
    But this gives me error
    I calculate calls per hour as a subtotal for each shop. ( There is a section on shop so for each shop under the section we will have calls per hour total)
    The formula to calculate calls per hour is little complex
    =If(Count([Date_Appeared];Distinct)=1;(Sum([Number Of Total Calls])/Average([Hours_Worked/60));(Sum( [Number Of Total Calls])/(Sum([Hours_Worked]/60) ForEach([Date_Appeared]) Where([Date_Appeared]<>Previous([Date_Appeared];Row)))))
    My think that the formula to calculate calls per hour has very little to do with summing the values for calls per hour. Please note that I have a V_Calls_Per_Hour_Average that holds that calculation.
    Please let me know on this.
    Thank You

  • How to get PERNR based on user ID

    Hi All,
    How to get PERNR based on userid.
    please help me in resolving this.
    Thanks for the support.
    Regards,
    Dhananjaya R E

    hope this will help u
    DATA:   t_pernr LIKE pa0105-pernr,
              t_email LIKE pa0105-usrid_long.
    STEP 1 - Find personnel number for UNAME
       SELECT SINGLE pernr
                 INTO t_pernr
                 FROM pa0105
               WHERE subty = '0001'
              AND endda >= sy-datum
             AND begda <= sy-datum
             AND usrid = p_uname.
    Employee record found*
    IF sy-subrc = 0.
    STEP 2 - Find email address for personnel number*
    SELECT SINGLE usrid_long
             INTO t_email
             FROM pa0105
            WHERE pernr = t_pernr
              AND subty = '0022'
              AND endda >= sy-datum
              AND begda <= sy-datum.

  • What type of form need to be using to get Display tab on the Section Properties of my Optional Section?

    What type of form need to be  using to get Display tab on the Section Properties of my Optional Section?
    CRISTINA&amp;amp MICROSOFT Forum

    Hi perezco,
    Are you using SharePoint?
    Please provide more information and screenshots about this issue.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • PAM-KRB5: account:  unable to get host based service name for realm

    I want a custom service to authenticate via PAM with Microsoft Active Directory Services on Windows 2003. kinit appears to work:
    Myserver% klist
    Ticket cache: /tmp/krb5cc_200
    Default principal: [email protected]
    Valid starting Expires Service principal
    Tue 01 Aug 2006 10:42:23 AM CDT Tue 01 Aug 2006 08:42:23 PM CDT krbtgt/[email protected]
    renew until Tue 08 Aug 2006 10:42:23 AM CDT
    Running a sample PAM consumer using 'winsamp' as its service name complains that Kerberos doesn't know the user. syslog reports: PAM-KRB5: account: unable to get host based service name for realm 'EXAMPLE.COM'.
    I'm stuggling to get any additional logging out of either PAM or Kerberos. Any advice appreciated.
    /etc/pam.conf:
    winsamp auth required pam_krb5.so.1 debug
    winsamp password required pam_krb5.so.1 debug
    winsamp account required pam_krb5.so.1 debug
    winsamp session required pam_krb5.so.1 debug
    /etc/krb5/krb5.conf:
    [libdefaults]
    default_realm = EXAMPLE.COM
    default_tkt_enctypes = des-cbc-md5 ; or des-cbc-crc
    default_tgs_enctypes = des-cbc-md5 ; or des-cbc-crc
    [realms]
    EXAMPLE.COM = {
    kdc = mykdc.example.com:88
    admin_server = mykdc.example.com
    default_domain = EXAMPLE.COM
    [domain_realm]
    .example.com = EXAMPLE.COM
    [logging]
    default = FILE:/var/krb5/kdc.log
    kdc = FILE:/var/krb5/kdc.log
    kdc_rotate = {
    # How often to rotate kdc.log. Logs will get rotated no more
    # often than the period, and less often if the KDC is not used
    # frequently.
    period = 1d
    # how many versions of kdc.log to keep around (kdc.log.0, kdc.log.1, ...)
    versions = 10
    [appdefaults]
    kinit = {
    renewable = true
    forwardable= true
    PAM sample application synopsis:
    pam_start("winsamp", "someuser", &conv, &pamh);
    err = pam_authenticate(pamh, 0);
    if (err == PAM_USER_UNKNOWN)
    printf("don't know that user\n"); // <-- we always arrive here
    logout();
    }

    Part of the problem was that the Sun server's domain was not an exact match for the ADS domain. One was XXXX.EXAMPLE.COM and the other was just EXAMPLE.COM. Adding the equiv. domains in krb5.conf improved that situation.
    The sample PAM application still doesn't behave the way I want. When pam.conf is configured to authenticate against /etc/passwd, it works. Not when authenticating against ADS alone. I've come to the conclusion that PAM is for authenticating ONLY access to Solaris accounts.
    My application does not need a Solaris account. Am I using the wrong authentication API?

  • SC-Sourcing getting contracts based on category_id? BADI-bbp_sos_Badi?

    Hi,
    In Shopping Cart-Sourcing, by default it is selecting contracts based on ORDERED_PROD,PRODUCT (material no).
    But I want to implement search logic to get contracts based on CATEGORY_ID.
    All the contracts related to this category_id I want to get that contracts.
    Can any one give idea how I can get this?
    I tried to implement BADI -BBP_SOS_BADI
    Method -BBP_SOS_SEARCH
    I tried to use the FM - BBP_PD_INDEX_FIND and pass the contracts to the BADI but it is not working.
    Did anyone worked on this method, please let me know how to get the complete contracts info and sending back to BADI?
    Thanks in advance.

    Hi,
    there is one open point for me in your question. Would you like to search:
    1) only for product category contracts (which don't have product ID)
    2) for contracts, which category equals to the category ID of the SC item (practically also contracts should appear, which have from the SC items product ID different product ID)
    For the first case you only need to modificate the coding in the form SOS_LOCAL_CALL_PD (LBBP_SC_APPF87):
    Kontext-Block                                          
      else.                                                
        clear ev_error.                                    
    *   Delete heade contract from the SOS                 
    Delete-Block                                           
        DELETE et_con_list WHERE ctr_item_number = space.  
    Insert-Block                                           
    *    DELETE et_con_list WHERE ctr_item_number = space. 
    With this change in addition to the ORDERED_PROD search also product category contracts will be found.
    Regards,
    Peter

  • SC-Sourcing getting contracts based on category_id?

    Hi,
    In SC-Sourcing, by default it is selecting contracts based on ORDERED_PROD,PRODUCT (material no).
    But I want to implement search logic to get contracts based on  CATEGORY_ID.
    All the contracts related to this category_id I want to get that contracts.
    Can any one give idea how I can get this?
    I tried to implement BADI -BBP_SOS_BADI
    Method -BBP_SOS_SEARCH
    I tried to use the FM - BBP_PD_INDEX_FIND and pass the contracts to the BADI but it is not working.
    Did anyone worked on this method, please let me know how to get the complete contracts info and sending back to BADI?
    Thanks in advance.

    Hi,
    please see the answer:
    SC-Sourcing getting contracts based on category_id? BADI-bbp_sos_Badi?
    Regards,
    Peter

  • Can 'Region' field gets defaulted based on owner of account?

    Hi
    Can 'Region' field in Account sales information gets defaulted based on owner of account?
    Owner belongs to 'West' region then account should get defaulted with same region.
    I have defined 'West' as territory for this owner.
    Do anybody has expression available for making field default ?
    Thanks
    Santosh

    Mahesh,
    Read-only is an option, but only if you never want users to change the values. If your users always work in the same Div, Region, and Sub-Region, then it would be reasonable to lock it so they don't feel like they have to update it. If,however, you have users that work in more than one sub-region, and they need to update it, then you wouldn't make it read-only.
    As far as workflow is concerned, you would need it to update the values when the ownership changes, if that is a requirement. If you choose not to update it, then it might not reflect the correct values for the new owner. Your decision on whether or not to implement the workflow would be based on whether or not your business rules require it. Most of the time, customers want the data to reflect the correct values for the current owner, but not always, so check with your customers and let the requirements drive the decision.
    Good Luck,
    Thom

  • Is it possible to suppress the Page Header of the Main Report based on the Section Name?

    Hi,
    I am fairly new to Crystal Reports XI.  Is it possible to suppress the Page Header of the Main Report based on the Section Name?  Thanks.

    In the section expert you can enter a formula on the suppress function.
    You just need something to check against if it is section name you say
    {section name} ="Suppressme"
    I have used it more in drill level to display headers based on how far you have drilled into a report.
    Hope this helps
    Eric
    Via Christi Health System

  • How to get CHARG based on matnr

    Hi Experts,
              I want to get PO batch(CHARG) based upon matnr.I am using BAPI_PO_GETDETAIL and receiving PO details by providing purchase order number.The line item table there is no field called charg. ..
    So How to get Charg based upon matnr
    Thanks & Regards
    Mathi

    Hello,
    Get from the table
    MCHA - Batches
    Regards,
    Vasanth

  • Importing a XML file in my INDD template. I get lots of unwanted paragraph breaks

    Hi,
    I am importing a XML file in my INDD template. I get lots of unwanted paragraph breaks where the closing xml tags for elements appear.
    Can someone guide me please to rectify the problem?
    Regards,
    ~shibu

    Here is the screen shot from INDD: Though I manage to get rid 0f them when i close up the XML tag manually, I want a sure-shot solution. Thanks for helping me out.
    and here is the screen shot of the XML coding:
    <para aid:pstyle="4 body text">Another common alkali is potassium hydroxide, KOH.</para>
    <equation><mathphrase>KOH(aq) &#x2192; K<superscript>+</superscript>(aq) + OH<superscript>&#x2013;</superscript>(aq)</mathphrase></equation>
    <qandaset>
    <title aid:pstyle="7 Questions heading"><emphasis role="underline">Questions A</emphasis></title><qandadiv><qandaentry><question><orderedlist numeration="arabic" startingnumber="1">
    <listitem><para aid:pstyle="7 Question text">Two solutions are tested with universal indicator paper. Solution A has a pH of 8 and solution B has a pH of 14. What does this tell you about the two solutions?</para></listitem>
    <listitem><para aid:pstyle="7 Question text">Methyl orange is added to a solution and the solution turns pink. What does this tell you about the solution?</para></listitem><listitem><para aid:pstyle="7 Question text">What does the &#x2018;basicity&#x2019; of an acid refer to?</para></listitem>
    <listitem><para aid:pstyle="7 Question text">Calcium oxide is an example of a base. How do you know this?</para></listitem>
    </orderedlist>
    </question>
    </qandaentry>
    </qandadiv>
    </qandaset>
    </sect1>
    <sect1>
    <title aid:pstyle="3 Heading">What are salts?</title>
    <para aid:pstyle="4 body text">Previously, it was explained that acids contain <emphasis role="bold" aid:cstyle="4 body bold">replaceable hydrogen atoms</emphasis>, and that when <emphasis role="bold" aid:cstyle="4 body bold">metal atoms</emphasis> take their place, a compound called a salt is formed. The names of salts have two parts, as shown:</para>
    <!-- <equation><mediaobject><textobject><figure href="file:///D:/images/reaction2.tif"><title/><para/></figure></textobject></mediaobject></equation> -->
    <para aid:pstyle="4 body text">The table shows the four most common acids and their salt names.</para>

Maybe you are looking for

  • Error while configuring CCMS Agent

    Hello Gurus, I am trying to install CCMS agent on our BI Dev system, but it gives me below error. Error Message - ERROR: Cannot open Monitoring Segment 0 rtc = 245 Last reported error: [249]  CCMS monitoring segment has wrong EYE CATCH: CCMS mo nitor

  • PDF iFilter 11.0.01 for x64 is not usable

    I use Traditional Chinese Windows 7 x64 Home Premium SP1 and Adobe Reader 11.0.02. I don't use the "Windows Search" service and have disabled it. Today I un-installed the old Adobe PDF iFilter 9 for x64 (from Programs and Features), restarted my PC a

  • HT4623 How to restore contacts list after upgrading to iOS 7.2

    How do I restore the contacts list I had on my iPhone 4 after upgrading to iOS7.2? The folder is completely empty/ Thanks

  • How to transport the modification done to the Portal?

    Hi, I am new to enterprise protal. I have added a page to a work set in MSS. Now I want to transport this to Quality. For this, I have created a transport package in Systetm Administration and have added the folder in whcih i have created a page. Now

  • ITunes randomly starting up??

    Hey- I just got my new MacBook about 1 month ago. Just recently I've had a problem with iTunes randomly opening up. I've tried quitting it multiple times, but it will just open up again. What can I do to stop this from happening?? Thanks -cmeinhar Ma