[CS3, VB] How to find text and store as a string

Dear all,
I'm stymied again with what seems a simple thing. But you hear that a lot.
I want to find a reference number in a document and then use that to create a filename later on.
I've got this far, adapting code from another topic:
myString = "Release No. ^9^9^9^9"
Set myFileSystemObject = CreateObject("Scripting.FileSystemObject")
Set myInDesign = CreateObject("InDesign.Application.CS3")
Set myDocument = myInDesign.ActiveDocument
myInDesign.FindTextPreferences = idNothingEnum.idNothing
myInDesign.FindTextPreferences.FindWhat = myString
set myFounded = myDocument.findText()
call myInDesign.select(myFounded.item(1))
I know I shouldn't have to select it as such, but anyway, I'm stuck converting the found text into a string. And then I want to just grab the four digits.
Also, could you provide the code to put that into a if/then statement in case it doesn't find anything?
Thanks
Nigel

Perhaps we need some clarification.
Can you post one -> Good Data
one -> Bad Data
And, the required output - i mean the way you want to display those bad data. And, also post your exact oracle version by this way ->
select * from v$version;Regards.
Satyaki De.

Similar Messages

  • Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    You installed the "DownLite" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "VSearch" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    This trojan is distributed on illegal websites that traffic in pirated movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the DownLite developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised the value of Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • HT1848 I rented four movies on my mac and then transfered them to my iPad, i then did an update to my iPad, now the rentals are not on my ipad nor my mac. I did not watch them and I was charged for them. How do find them and transfer back on my iPad

    I rented four movies on my mac and then transfered them to my iPad, i then did an update to my iPad, now the rentals are not on my ipad nor my mac. I did not watch them and I was charged for them. How do find them and transfer back on my iPad

    If you moved them to your iPad then they will have been removed from your Mac.  If they are no longer in the iPad's Videos app following the update then you will need to try contacting iTunes support and see if they will let you re-download them : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • Find text and replace with image - Help needed

    Hi,<br /><br />We need to place the images as inline in the appropriate places.<br /><br />texttexttext<<test1.eps>>texttexttexttexttexttext<<test2.eps>>texttexttexttexttexttext< <test3.eps>>texttexttexttexttexttext<<test4.eps>>texttexttexttexttexttext<<test5.eps>>text texttext<br /><br />This code is helpful for placing a single image at a time, we are unable to place all the images in one shot, can anyone help me out.<br /><br />I am not a programmer.<br /><br />-----------<br />var myDoc = app.activeDocument; <br />app.findPreferences = app.changePreferences = null; <br />var math=document.search("test.eps"); <br />for (i=math.length-1; i >=0; i--)<br />{ myDir = Folder.selectDialog(); <br />AllGraphics = Folder(myDir).getFiles('test.eps') <br />for (i=0; i<math.length; i++) { app.select(anil1[i]); <br />     myDoc.place(AllGraphics[i],false); } }<br />-----------<br /><br />Note: I have taken this code from forum and we have made some changes on this.<br /><br />Kavya

    Jongware,<br /><br />I try running it but gives errors:<br /><br />Error Number: 55<br />Error String: Object does not support the property or method 'changePreferences'<br />Line: 24<br />Source: app.findPreferences = app.changePreferences = null;<br /><br />This is the code I used<br /><br />// Find text and replace with image for InDesign CS3 <br />// http://www.adobeforums.com/webx?128@@.3bbf275d.59b6f012<br />var heyItsAnArray = new Array ( <br /><br />   "it contains this line!", <br /><br />   "as well as this one", <br /><br />   "or even more!", <br /><br />   "test.eps" ); <br /><br />for (arrayCount=0; arrayCount<heyItsAnArray.length; arrayCount++) <br /><br />{ <br /><br />   replaceImg (heyItsAnArray[arrayCount]); <br /><br /> } <br /><br />function replaceImg (name) <br /><br />{ var myDoc = app.activeDocument;  <br />     app.findPreferences = app.changePreferences = null;  <br />     var math=document.search(name); <br />     for (i=math.length-1; i >=0; i--)  <br />     { myDir = Folder.selectDialog();  <br />          AllGraphics = Folder(myDir).getFiles(name)  <br />          for (i=0; i<math.length; i++) { app.select(anil1[i]); <br />               myDoc.place(AllGraphics[i],false); <br /><br />               } <br /><br />          } <br /><br />     }<br /><br />Michael

  • How to find Latch and what actions need to be taken when there is a latch

    Hi
    Can you please tell me how to find Latch and what actions need to be taken when there is a latch?
    Thanks
    Regards,
    RJ.

    1. What is a latch?
    Latches are low level serialization mechanisms used to protect shared
    data structures in the SGA. The implementation of latches is operating
    system dependent, particularly in regard to whether a process will wait
    for a latch and for how long.
    A latch is a type of a lock that can be very quickly acquired and freed.
    Latches are typically used to prevent more than one process from
    executing the same piece of code at a given time. Associated with each
    latch is a cleanup procedure that will be called if a process dies while
    holding the latch. Latches have an associated level that is used to
    prevent deadlocks. Once a process acquires a latch at a certain level it
    cannot subsequently acquire a latch at a level that is equal to or less
    than that level (unless it acquires it nowait).
    2. Latches vs Enqueues
    Enqueues are another type of locking mechanism used in Oracle.
    An enqueue is a more sophisticated mechanism which permits several concurrent
    processes to have varying degree of sharing of "known" resources. Any object
    which can be concurrently used, can be protected with enqueues. A good example
    is of locks on tables. We allow varying levels of sharing on tables e.g.
    two processes can lock a table in share mode or in share update mode etc.
    One difference is that the enqueue is obtained using an OS specific
    locking mechanism. An enqueue allows the user to store a value in the lock,
    i.e the mode in which we are requesting it. The OS lock manager keeps track
    of the resources locked. If a process cannot be granted the lock because it
    is incompatible with the mode requested and the lock is requested with wait,
    the OS puts the requesting process on a wait queue which is serviced in FIFO.
    Another difference between latches and enqueues is that
    in latches there is no ordered queue of waiters like in enqueues. Latch
    waiters may either use timers to wakeup and retry or spin (only in
    multiprocessors). Since all waiters are concurrently retrying (depending on
    the scheduler), anyone might get the latch and conceivably the first one to
    try might be the last one to get.
    3. When do we need to obtain a latch?
    A process acquires a latch when working with a structure in the SGA
    (System Global Area). It continues to hold the latch for the period
    of time it works with the structure. The latch is dropped when the
    process is finished with the structure. Each latch protects a different
    set of data, identified by the name of the latch.
    Oracle uses atomic instructions like "test and set" for operating on latches.
    Processes waiting to execute a part of code for which a latch has
    already been obtained by some other process will wait until the
    latch is released. Examples are redo allocation latches, copy
    latches, archive control latch etc. The basic idea is to block concurrent
    access to shared data structures. Since the instructions to
    set and free latches are atomic, the OS guarantees that only one process gets
    it. Since it is only one instruction, it is quite fast. Latches are held
    for short periods of time and provide a mechanism for cleanup in case
    a holder dies abnormally while holding it. This cleaning is done using
    the services of PMON.
    4. Latches request modes?
    Latches request can be made in two modes: "willing-to-wait" or "no wait". Normally,
    latches will be requested in "willing-to-wait" mode. A request in "willing-to-wait" mode
    will loop, wait, and request again until the latch is obtained. In "no wait" mode the process
    request the latch. If one is not available, instead of waiting, another one is requested. Only
    when all fail does the server process have to wait.
    Examples of "willing-to-wait" latches are: shared pool and library cache latches
    A example of "no wait" latches is the redo copy latch.
    5. What causes latch contention?
    If a required latch is busy, the process requesting it spins, tries again
    and if still not available, spins again. The loop is repeated up to a maximum
    number of times determined by the initialization parameter SPINCOUNT.
    If after this entire loop, the latch is still not available, the process must yield
    the CPU and go to sleep. Initially is sleeps for one centisecond. This time is
    doubled in every subsequent sleep.
    This causes a slowdown to occur and results in additional CPU usage,
    until a latch is available. The CPU usage is a consequence of the
    "spinning" of the process. "Spinning" means that the process continues to
    look for the availability of the latch after certain intervals of time,
    during which it sleeps.
    6. How to identify contention for internal latches?
    Relevant data dictionary views to query
    V$LATCH
    V$LATCHHOLDER
    V$LATCHNAME
    Each row in the V$LATCH table contains statistics for a different type
    of latch. The columns of the table reflect activity for different types
    of latch requests. The distinction between these types of requests is
    whether the requesting process continues to request a latch if it
    is unavailable:
    willing-to-wait If the latch requested with a willing-to-wait
    request is not available, the requesting process
    waits a short time and requests the latch again.
    The process continues waiting and requesting until
    the latch is available.
    no wait If the latch requested with an immediate request is
    not available, the requesting process does not
    wait, but continues processing.
    V$LATCHNAME key information:
    GETS Number of successful willing-to-wait requests for
    a latch.
    MISSES Number of times an initial willing-to-wait request
    was unsuccessful.
    SLEEPS Number of times a process waited a requested a latch
    after an initial wiling-to-wait request.
    IMMEDIATE_GETS Number of successful immediate requests for each latch.
    IMMEDIATE_MISSES Number of unsuccessful immediate requests for each latch.
    Calculating latch hit ratio
    To get the Hit ratio for latches apply the following formula:
    "willing-to-wait" Hit Ratio=(GETS-MISSES)/GETS
    "no wait" Hit Ratio=(IMMEDIATE_GETS-IMMEDIATE_MISSES)/IMMEDIATE_GETS
    This number should be close to 1. If not, tune according to the latch name
    7. Useful SQL scripts to get latch information
    ** Display System-wide latch statistics.
    column name format A32 truncate heading "LATCH NAME"
    column pid heading "HOLDER PID"
    select c.name,a.addr,a.gets,a.misses,a.sleeps,
    a.immediate_gets,a.immediate_misses,b.pid
    from v$latch a, v$latchholder b, v$latchname c
    where a.addr = b.laddr(+)
    and a.latch# = c.latch#
    order by a.latch#;
    ** Given a latch address, find out the latch name.
    column name format a64 heading 'Name'
    select a.name from v$latchname a, v$latch b
    where b.addr = '&addr'
    and b.latch#=a.latch#;
    ** Display latch statistics by latch name.
    column name format a32 heading 'LATCH NAME'
    column pid heading 'HOLDER PID'
    select c.name,a.addr,a.gets,a.misses,a.sleeps,
    a.immediate_gets,a.immediate_misses,b.pid
    from v$latch a, v$latchholder b, v$latchname c
    where a.addr = b.laddr(+) and a.latch# = c.latch#
    and c.name like '&latch_name%' order by a.latch#;
    8. List of all the latches
    Oracle versions might differ in the latch# assigned to the existing latches.
    The following query will help you to identify all latches and the number assigned.
    column name format a40 heading 'LATCH NAME'
    select latch#, name from v$latchname;

  • How to find classtype and class for a material.

    Hi,
    How to find classtype and class for a material.
    which table contains this data.
    Thanks
    Kiran

    Hi Kiran,
    Check below sample code. Use this BAPI which will give all info about the class for the material.
      DATA:      l_objectkey_imp    TYPE bapi1003_key-object
                                         VALUE IS INITIAL.
      CONSTANTS: lc_objecttable_imp TYPE bapi1003_key-objecttable
                                         VALUE 'MARA',
                 lc_classtype_imp   TYPE bapi1003_key-classtype
                                         VALUE '001',
                 lc_freight_class   TYPE bapi1003_alloc_list-classnum
                                         VALUE 'FREIGHT_CLASS',
                 lc_e               TYPE bapiret2-type VALUE 'E',
                 lc_p(1)            TYPE c             VALUE 'P',
                 lc_m(1)            TYPE c             VALUE 'M'.
      SORT i_deliverydata BY vbeln posnr matnr.
      CLEAR wa_deliverydata.
      LOOP AT i_deliverydata INTO wa_deliverydata.
        REFRESH: i_alloclist[],
                 i_return[].
        CLEAR:   l_objectkey_imp.
        l_objectkey_imp = wa_deliverydata-matnr.
    *Get classes and characteristics
        CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'
          EXPORTING
            objectkey_imp         = l_objectkey_imp
            objecttable_imp       = lc_objecttable_imp
            classtype_imp         = lc_classtype_imp
    *   READ_VALUATIONS       =
            keydate               = sy-datum
            language              = sy-langu
          TABLES
            alloclist             = i_alloclist
    *   ALLOCVALUESCHAR       =
    *   ALLOCVALUESCURR       =
    *   ALLOCVALUESNUM        =
            return                = i_return
    Thanks,
    Vinod.

  • HT2509 Hello I wonder if anyone knows how to find, download and install a suitable IPA (phonetics) font for the Mac Air? I need to be able to use a pop up window of fonts.

    Hello I wonder if anyone knows how to find, download and install a suitable IPA (phonetics) font for the MacBook  Air? I need to be able to use a pop up window of fonts.

    Unless you've done anything to change it, Google keeps every email that ever passes through their server in your All Mail folder/mailbox/label. Even if you delete stuff, they hold onto it, there. You have to go out of your way to actually delete anything permanently.

  • How to find list and cost price in MM module

    Hi
    Can any one help me in how to find List and cost price in MM module for pricing.
    thank you.
    David

    hi Saquib Khan
    Many thanks Saquib Khan for ur reply. Actually iam trying to create a report which displays material number, material description, plant, product hierarchy, cost and list price, based on the selection criteria of a range of materials, plant and also product hierarchy.
    If u want to share any information.It would be much better for me.Like iam learning SAP.
    thanks.

  • HOW TO FIND WF_ITEM_TYPE AND WF_ITEM_KEY FOR PO

    제품 : MFG_PO
    작성날짜 : 2003-05-14
    HOW TO FIND WF_ITEM_TYPE AND WF_ITEM_KEY FOR PO
    ===============================================
    PURPOSE
    This solution is for Oracle Purchasing 11 and higher
    Explanation
    1. Start a SQL*Plus session using the APPS schema.
    2. Run the following script and enter the Purchase Order number that is stuck
    in process when prompted for the PO_NUMBER:
         SELECT WF_ITEM_TYPE, SUBSTR(WF_ITEM_KEY,1,25) "WF_ITEM_KEY"
         FROM PO_HEADERS_ALL
         WHERE AUTHORIZATION_STATUS='IN PROCESS'
         AND SEGMENT1='&PO_NUMBER';
    3. If more than one row is returned, then run the following script and only
    refer to the row that contains the OPERATING_UNIT_NAME that equals the
    operating unit name tied to the responsibility used when the Purchase Order was
    discovered as being stuck in process.
         SELECT SUBSTR(WF_ITEM_TYPE,1,12) "WF_ITEM_TYPE",
         SUBSTR(WF_ITEM_KEY,1,15) "WF_ITEM_KEY",
         SUBSTR(NAME,1,35) "OPERATING_UNIT_NAME"
         FROM PO_HEADERS_ALL PA, HR_ORGANIZATION_UNITS OU
         WHERE PA.ORG_ID=OU.ORGANIZATION_ID
         AND AUTHORIZATION_STATUS='IN PROCESS'
         AND SEGMENT1='&PO_NUMBER';
    Example
    Reference Documents
    -------------------

    Hi Kishore,
    Welcome to SCN!
    to find the sales order from Purchase order , go to SE16, Enter the table name as VBAK and press Enter.
    In BSTNK field of VBAK, Enter the Purchase order number. System will return you corresponding sales order.
    Hope this will help you.
    Regards,
    Nikhil

  • How to find files and subdirectories in a directory

    can anyone tell me how to find files and subdirectories in a directory .

    Here's a code snippet,
    http://javaalmanac.com/egs/java.io/TraverseTree.html

  • So someone took my ipod 4g and who ever took it turned it off and i dont know how to find it and i really want it back, what should i do?

    so someone took my ipod 4g and who ever took it turned it off and i dont know how to find it and i really want it back, what should i do?

    lost/stolen                                      
    No app on the iPod is required.                            
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected, on a computer browser go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it unless you had iOS 7 on the device. With iOS 7, one has to enter the Apple ID and password to restore the device.
    - Apple will do nothing without a court order                                                
    Reporting a lost or stolen Apple product                                               
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • How to find text or paragraph by giving style name?

    Hello,
    can any body tell me,How to find text or paragraph by giving style name?actully i have so many styles which is applied on document.
    i want to find text in the document which have particular style name.is any method to find text by giving name of style?

    Any of the various findText methods, plus your paragraph style name in FindTextPreferences: http://jongware.mit.edu/idcs5js/pc_FindTextPreference.html
    Use Google to locate exact samples, as this has been done countless times before.

  • How to find date and time on photo taken by iphone?, How to find date and time on photo taken by iphone?

    How to find date and time on iphone's photo taken?

    in iPhoto no matter the source of the photo you see the information about th ephoto by selecting the photo and showing info (the get info button may be in a different location depending on the version of iPhoto you have)
    If you are not aking an iPhoto question but are asking an iPhone question instead then repost in the iPhone forum - iPhoto has no association with the iPhone
    LN

  • I have result after execution of OperationBinding. How can i parse and store in list.

    I have result after execution of operation binding. how can i parse and store in list

    Hi,
    I Thought u have custom method in AM which returns List Data type. What is the requirement exactly, bcz commit operation have void return type.
    Ex: create custom method in AMimple class
    public List sampleData(){
    // code here to set the values in List object.
    now expose the above method in client interface. Then add the Method action binding in pageDef file and execute the below code in managed bean
    OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("sampleData");
                List result =(List) operationBinding.execute();
    Thanks
    Nitesh

  • How to Find fields and tables of any Datasource

    Hi  ,
    How to find tables and fields for DataSource  2LIS_05_QE1 , and extractstruct is MC05Q1_0INSP as per requirement to find INCOMING PPM.
    is there any specific technique , to find any tables and fields related to our requirement in any DataSource .
    thank's

    Check in LBWE transaction ..
    for
    2LIS_05_QE1 , and extractstruct is MC05Q1_0INSP as per requirement to find INCOMING PPM.
    go to quality management ..
    you will get the data source
    if you click on maintenance ..
    BR
    Manthan

Maybe you are looking for

  • Macbook pro screen blank

    Hi guys. Need some help. I purchased macbook pro 15" about 1 and a half year ago. It works well at first. But just yesterday. When i turn my macbook. The screen went distorted, displaying color particle and else. Can u guys help me?

  • Problème d'acquisition des données pendant un temps fixé par l'utilisateur

    Bonjour la communauté Labview, j'ai un problème d'acqusition et d'écrire des données dans un fichier .lvm Comme vous le montre le fichier pdf joint, en mode manuel toute se passe bien. Lorsque j'appuie sur le bouton acquisition, un nombre de données

  • What exactly 'PAYLOAD' Means???

    What exactly 'PAYLOAD' means.??? Please help me with simple examples and in context of BPM process.

  • Premiere CC not showing video to monitor

    Premiere Pro CC 2014 (most recent version as of 3-12-15) no longer outputs HDMI. Previously I've been playing the Program Monitor full screen to a Samsung PDP51 TV using the sole mac HDMI output. It seems to be related with the Mac Security Update 20

  • Substitution Rules for FB70

    Dear experts, We have an ECC environment in which an FI substitution rule is configured. It's working fine in the DEV client and it generated the GBTAUFIB include. In the QAS client it generated an include with a different name, GBTIMFIB. This includ