(VBS CS2) Need help for indexing: creating a page reference

This is my first post on this forum. While I have years of experience in PageMaker scripts, I am new to scripting InDesign. I need to create a reference of current page and index Word, 'Widgets '. I read PDF until my brain has turned to mush. I can't seem to connect the dots (literally) when it comes to this task.

This is my test script. The last line is where I'm stuck:

Const idCurrentPage = 1668444263
Hello REM everybody.
Set myInDesign = CreateObject ("InDesign.Application.CS2")
Create a new document of rem.
The value of myDocument = myInDesign.Documents.Add

A REM get a reference to the first page.
My page = myDocument.Pages.Item (1)
REM create a block of text.
Set myTextFrame = myDocument.TextFrames.Add
REM specify the size and shape of the text frame.
myTextFrame.GeometricBounds = Array ("0P0", "0p 0", "18 p 0", "18 p 0")
Text of the REM entered in the text block.
myTextFrame.Contents = "This is the new WidgetPro."

Create a new history of rem.
Set monarticle = myInDesign.ActiveDocument.Stories (1)
REM is the editor of the story.
Set myStoryEditor = myInDesign.ActiveDocument.Stories (1). StoryEdit
REM enter text.
myStory.insertionPoints.item(-1).contents = vbCr
myStory.insertionPoints.item(-1).contents = "Widgets".
REM creating an index (not sure if this is necessary).
Define myIndex = myDocument.indexes.add)
REM has add a topic (not sure if this is necessary).
Set myTopic = myIndex.Topics.add ("Widgets")
REM set a reference to the current page DOES NOT WORK
myTopic.pageReferences.add (myStory.insertionPoints [myIndex], PageReferenceType.CurrentPage)

A little more information if this can help: this process of building the story with words or corresponding indexed expressions through 30 + chapters for a total of 500 pages in the final book. The index is at the end of the book is created via the normal InDesign menu commands.

-Ike

As I said earlier, in classic VB there are void and functions. A Sub doesn't return anything, and its settings are not surrounded by parenthesis. A function returns a value and its parameters are surrounded by parentheses.

For example

Msgbox "This is a sub"
result = Msgbox("This is a Function")

even if the same command is used, it changes the rules when you return a value.

(Please note this wackyness changed in vb.net)

If you wan't to deal with a Sub in function, you can add the "Call" keyword before the Sub.

For example

Call Msgbox("This Sub acts like a Function")

Good luck

Steven

Tags: InDesign

Similar Questions

  • Need help for indexing...

    I need to remove all the brand a huge catalog index. Is it possible to do in the world? I've been through chapter by chapter and their removal in the palette of the index, but it takes forever.

    Thank you!!

    M

    This simple script should do. Save as plain text with a .jsx extension and place it in your Script Panel folder.

    topics=app.documents[0].indexes[0].allTopics;
    for(i=0;i		   
  • Need help for optical safety circuit.

    I buy these parts and prototype with real components, but since I multisim, I thought it would be nice to create the circuit and maybe work through issues I can practically.

    I need a circuit that takes 120 VCA, generates 5 VDC and 1.5Vdc power of optical transmitter and receiver.  I actually use a data port because he has great range and is pretty cheap.  Rather than send the binary code well I just send a light stead that is broken or not broken through doors and windows in my house.  Then the receiver sees this as an entry and order a relay.

    I tried several voltage regulators that come with multisim, but I get an error of execution of my circuit.  Really I can't the 120 VAC to power levels necessary for the functioning of the optics.

    Otherwise I might want to run on a system 120Vdc with battery backup, so throw a 120Vdc up to 20 v DC switching power supply - but I have not found a SMP in the library which takes 120 as input and as output 20.

    Basic plan: 120VAC source-> transform to 24Vac-> Full bridge rectifier to ~ 20 v DC-> voltage capacitor filter on the input of two voltage regulators (1 to 5 VDC, 1 to 1.5Vdc) - then circuit since the two power supply of the transmitter and the receiver.

    I just need help for 5V and 1.5V, from there, I know that the real world circuit will work component tests already carried out.  Thanks for reading.

    I didn't Multism so I can't advise you on the compatible models. I ran the model on semiconductors with slight modifications of format on my SPICE simulator based on Berkeley Spice 3f5. I had to change the format of model resistance semiconductors appeal but has not changed any values.

    The output of your power supply circuit 3 (with 5 V, not the 1.5 V regulator regulator) was 4.99995 V.

    There are a few messages about changing templates published for compatibility Multisim woth. You can search those to see if there are any suggestions on what you'll need to fix in the model.

    Lynn

  • I need help for the upgrade of my current system.

    I need help for the upgrade of my current system.

    I have SBS 2008 with (Exch 2007, SQL 2005, Sharepoint, backupexec 2010 for sbs) licenses.

    I want to make the larger environment using the following:

    (1) apply Virtualization

    (2) apply to the failover process (clustering)

    "(3) the environment must support adding server terminal server, ERP server, exchange server, domain controller, backup manager.

    Storage 4) that supports Raid (1 and 5)

    UTM excellent 6) that supports (SSL VPN, VPN Global)

    suitable backup solution 7)

    (8) good antivirus for clients

    my questions:

    (1) can you provide me with a good design for this environment

    (2) should I choose what operating system:

    Microsoft datacenter or company

    I know datacenter provide us the unlimited VM but needs per processor license

    so if I have two Grouped servers I want to buy 4 licenses

    and just 4 VMs per company license... to say that we have two servers and maintain 8 vms so wat happened if 1 goes down... How can I migrate the 4 virtual machines on the server failed to another server group... ? should I buy enterprise license?

    (3) if I get the SAN storage for data... How can I save this storage... should I get another SAN?

    (4) how can I upgrade SBS stad single server (windows standrad) without losing the licenses as Exch 2007, SQL 2005, sharepoint.is it a must to buy an edition full std server or there is a way to upgrade (license wise, I mean)?

    (5) what about win2k8 license for VM:

    lets say we have physical that has windows license so that enough to have windows for VM or should I buy windows for VM licenses?

    (6) can I use backExec license for SBS with windows 2008 standard

    (7) who better to virtualization AMD or INTEL

    (8) hyper V or VMware?

    (9) what of Microsoft data protection Manager... is this good?

    (10) what virtual machine manager? What are the benefites keys

    Thanks in advance

    Hello AnasAI,

    You can find the Server forums on TechNet support, please create a new post at the following link:

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

  • I need help for activation of the real administrator account.

    I have a problem with Adobe reader 9 standard, Adobe customer service asked the unhide real administrator account before you can continue to help me.

    I need help for that.

    http://www.Vistax64.com/tutorials/67567-administrator-account.html

    http://www.howtogeek.com/HOWTO/Windows-Vista/enable-the-hidden-administrator-account-on-Windows-Vista/

    Read the above info.

    See you soon. Mick Murphy - Microsoft partner

  • I need help for my reader to USB drive on my windows 10 ACER?

    I need help for my reader to USB stick on my chrome windows 10 plug ins acer. Can you help me?

    What Adobe application that you use?

    This is the Adobe Media Encoder forum, and you did not mention anything on this subject. If you can let us know what Adobe application, you need help, we can help you make the right forum.

    Thank you

    Regalo

  • Hello, I need help for cancel the payment on my adobe account.

    Hello, I need help for cancel the payment on my adobe account. I'm from Peru, Im paying a monthly fee as a student. Help, please...

    Cancel your membership creative cloud

  • Hello, need help for Adobe Reader DC playing animation files that are specified in the pdf output by script Latex Beamer. My Adobe Reader DC refuse to open any format that I gave him.  Thank you very much

    Hello, need help for Adobe Reader DC playing animation files that are specified in the pdf output by script Latex Beamer. My Adobe Reader DC refuse to open any format that I gave him.  Thank you very much

    Hey ihorl18351266,

    Please note that you can open PDF files using only the CD player. Any other format will not be supported by the software.

    Kind regards

    Ana Maria

  • Help. I created a page and I would like to connect it to a hyperlink so that people can access it by clicking on the words.

    Help. I created a page and I would like to connect it to a hyperlink so that people can access it by clicking on the words.

    Copy & paste this code into your parent page where you want your link will appear.

    http://example.com"> link to example.com.


    Change the URL in the properties panel link field.   See screenshot.

    Nancy O.

  • Re: Need help for the restoration of the system

    Hi, I need help!

    I recently bought a Toshiba Satellite. I had some problems when trying to install some programs, some seem to fail. I wanted to clean the computer with system restore disc, only to find a record of 32-bit to a 64-bit computer.
    There is a repair of the setting system installed on the computer but it does not work, when I put it on disk, files, it cannot be opened.

    I can restore the system somehow repair; It must have been damaged by a virus. It should come with a big warning that the disk is not compatible!

    I have burned one day drive the first if I d just so you know! Any advice?

    Hello

    At first, I must say that you should tell us what model of laptop you have exactly.

    I put t know what cell phone you have and what you have with her, but in fact, it's that many laptops come with preinstalled OS 64-bit and 32-bit version on DVD.

    In this case, you must create own 64 bit preinstalled use Toshiba recovery media creator recovery DVDs. Alternatively, you can install 64-bit without DVD disk with HARD drive recovery option > http://aps2.toshiba-tro.de/kb0/HTD9102IR0000R01.htm
    Of course, this will not work if you didn't change the factory settings.
    Try if it will work for you.

    At the end I would say that what I wrote is detailed described in the document s user manuals but I presume that you didn t read it, right?

  • [SOLVED] I need help for Shared Documents and Documents on my computer XP Home

    I need help with my shared Documents and other folders on my computer. I have an administrator account. My son has a limited access account.

    I clicked on the option 'make my private files and folders '.  His file was renamed to Documents now my shared Documents. It's just my account.

    I tried to undo what I did. I tried everything (I mean everything) has proposed to do online.

    First of all, I logged in Safemode administrator account. I went to the Documents folder, and I've added the Administrators group and click full control.

    Then I restored system a few weeks before. Then, I went to http://computers.douglasthrift.net/winxpfaq/#faq3_shared_documents and did everything.

    None of them worked. I did so much, that I don't remember.

    Then, I found that the registry key for the Shared Documents lacked in the MUi cache. @shell32.dll,-21785. I entered, but after I rebooted a few times, he disappeared. I have to hurt... In addition to this. Now I face a different problem. I don't know it is normal but when I login my account and click on

    My computer, I see Documents of my name and the name of my son in addition to Documents (Shared Documents).

    When I save a new file in the My Documents folder, it is automatically created in the folder of Documents of my name, too. I can't delete them because they are system folders. I crossed my registry keys in the MUI cache and discovered that 4 of them did not exist in other accounts.

    @shell32.dll,-21792; 21793; 21794; 21795 (%, etc. of music of % documents). I don't know if I can delete them or not.

    I'm not an expert in computers. I'm sorry that it is very long.  I hope someone can help me. Thank you.

    Hello

    I suggest you follow the troubleshooting steps and check if this solves the problem on your computer.

    Method:

    Ra SFC scan to search for the missing or corrupt files that can cause this problem.

    Of file system (CFS) when checking that all the Windows XP system files are intact and not altered, changed or damaged.

    a. Click Start, click programs, accessories, command prompt principally made.

    b. in the type in the following command prompt window and press ENTER:

    sfc/scannow

    If you are prompted to insert the Windows XP disc, load the disc of Windows XP on the CD drive on your computer.

    Once the scan finished restart your computer and test to see if the problem you are experiencing is resolved or not.

    Reference: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/system_file_checker.mspx?mfr=true

    I hope this information helps. Please get back to us if you have any other questions on this subject.

  • I need help for query AVG

    I need help with a simple query in an ORACLE database. I tried a lot of things that I found on the internet, but none of them worked for me.

    The following query retrieves four lines:

    SELECT sampled_date AS VALUE1, VALUE2 AS result, 0 as value3

    Of asw_lab

    WHERE template_result = 'A' AND analysis = 'B' AND ROWNUM < 5

    ORDER BY sampled_date DESC;

    I would like to calculate a moving average of the last four values with the date of the sample of the last line.

    For example, I have this result for the query above:

    Value1 value2 value3

    01/04/14-16:00 1 0

    01/04/14 15:00 2 0

    01/04/14 14:00 3 0

    01/04/14 13:00 4 0

    I want to extract the below my average/query calculation result:

    Value1 value2 value3

    01/04/14-16:00 2.5 0

    Can you help me create a request to that effect?

    Thank you

    Maybe it's

    Select max (VALUE1) VALUE1, VALUE2 avg (VALUE2), avg (VALUE3) value3

    Of

    (

    SELECT sampled_date AS VALUE1, VALUE2 AS result, 0 as value3

    Of asw_lab

    WHERE template_result = 'A' AND analysis = 'B' AND ROWNUM<>

    )

  • Need help for query flat_file type clobdata oracle table data.

    Hi Sir,

    I need help to query oracle table flat file data having given clob type.
    Oracle Version:
    
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE     10.2.0.1.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    
    
    Source table
    
      CREATE TABLE order_details 
       (     QUEUE_SEQNUM NUMBER(10,0) NOT NULL ENABLE, 
         LINE_SEQNUM NUMBER(10,0) NOT NULL ENABLE, 
         CHAR_DATA CLOB, 
         OPTIMISTIC_LOCK_KEY NUMBER(20,0)
       ) 
    COLUMN FOR CHAR_DATA FLAT_FILE
    EU,6067AT,AT10,000000402004,NexiumGERDManagementProject,Z435,,ZZ29,NIS-GOLD,AT
    EU,6067AT,AT10,000000402038,NIS-OEU-ARI-2007/1,Z450,,ZZ29,NIS-OEU-ARI-2007/1,AT
    EU,6067AT,AT10,000000402039,SymbicortNISinCOPD,Z450,,ZZ29,NIS-REU-DUM-2007/1,AT
    EU,6067AT,AT10,000000402040,D1443L00044SeroquelXRRuby,Z450,,ZZ29,D1443L00044,AT
    EU,6067AT,AT10,000000402041,NIS-GEU-DUM-2008/1,Z450,,ZZ29,NIS-GEU-DUM-2008/1,AT
    EU,6067AT,AT10,000000402042,SonstigeAktivitätenLCM,Z450,,ZZ29,.,AT
    EU,6067AT,AT10,000000402134,D1680L00002Saxagliptin,Z450,,ZZ29,D1680L00002,AT
    EU,6067AT,AT10,000000402199,SeroquelWaveNIS,Z450,,ZZ29,NIS-NEU-DUM-2009/1,AT
    EU,6067AT,AT10,000000402313,SeroquelExtra(D1443L00082),Z450,,ZZ29,D1443L00082,AT
    EU,6067AT,AT10,000000402517,AtlanticD5130L00006(AZD6140),Z450,,ZZ29,D5130L00006,AT
    EU,6067AT,AT10,000000554494,ArimidexSt.Gallen(13+2),Z142,,ZZ09,,AT
    EU,6067AT,AT10,000000554495,ArimidexASCO(5delegates),Z142,,ZZ09,,AT
    EU,6067AT,AT10,000000554496,ArimidexSanAntonio6delegates,Z142,,ZZ09,,AT
    EU,6067AT,AT10,000000554497,ArimidexBreastCancerSummit(13+2),Z130,,ZZ09,,AT
    EU,6067AT,AT10,000000554498,ArimidexEIH(15delegates),Z130,,ZZ09,,AT
    EU,6067AT,AT10,000000554499,ArimidexNIFA(200delegates),Z135,,ZZ09,,AT
    EU,6067AT,AT10,000000554500,ArimidexNIFAworkshops(8x25),Z135,,ZZ09,,AT
    EU,6067AT,AT10,000000554501,ArimidexPraktischeGyn.Fortbildung,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554502,ArimidexAGO,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554503,ArimidexHämato/OnkologieKongress,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554504,ARIMIDEXGYNäKOLOGENKONGRESS,Z147,,ZZ09,,AT
    EU,6067AT,AT10,000000554505,ArimidexChirurgenkongress,Z147,,ZZ09,,AT
    EXPECTED RESULTS:
    AFFIRM_CODE COMPANY_CODE INTERNAL_ORDER_CODE INTERNAL_ORDER_DESC ENIGMA_ACTIVITY             SUB_ACTIVITY_CODE IN_AFF_IND ORDER_TYPE EXTERNAL_ORDER COUNTRY        
    EU          6067AT       AT10                 000000402004       NEXIUMGERDMANAGEMENTPROJECT     Z435           NULL        ZZ29       NIS-GOLD        AT             
    EU          6068AT       AT11                 000000402005       NEXIUMGERDMANAGEMENTPROJECT     Z435           NULL        ZZ29       NIS-GOLD        AT             

    Sorry, my bad. Without database at hand, I'll try 'baby steps' (borrowed from Frank) so you don't confuse it with errors that I might add (happens far too often already, but at least you won't "swallow" as forum members think is one of the main goals of this fighter - help her learn - providing not only the proverbial fish.)
    Search the Forum - your problem is one of its best sellers. Watching {message identifier: = 10694602} ("split string into" was the key word used in research) you can try something as

    select table_row,
           level clob_row,
           regexp_substr(char_data,'[^' || chr(13) || chr(10) || ']+',1,level) the_line
      from (select to_char(queue_seqnum)||':'||to_char(line_seqnum) table_row,
                   char_data
              from order_details
           )
     connect by regexp_substr(char_data,'[^' || chr(13) || chr(10) || ']+',1,level) is not null
            and prior char_data = char_data
            and prior table_row = table_row
            and prior sys_guid() is not null
    

    to get all the s the_lineall CLOB and after that the use of the example even to get your columns of each the_line.

    Concerning

    Etbin

    Edited by: Etbin on 3.2.2013 09:01

    .. .but I m connected to do things according to the instructions, I can't do something.

    Used to happen to me too and I did as told to the but only after explaining any disadvantages, I was aware of in time. The last sentence is usually: "O.K. now be just and Don't come back with that kind of thing when it turns out that this isn't the right thing."
    rp0428 post - something to remember.

  • Need help for a multiline ComboBox...

    Hello

    I'm new to Flash, and I need help. I am trying to create a multiline combobox, but I can't seem to have a bit of luck. I looked for possible answers, and most of them points to the cell rendering engine. Whenever I try to use it, I have several errors. That's what I try to do: http://www.wikihow.com/Create-Interactive-Multiple-Choice-Quiz-in-Adobe-Flash-Cs4

    The only difference is that I need multiline instead of simple lines. Is it possible that a perfect beginner could do this?

    not really.  You must create a custom cellrenderer class and, I don't think it's easy for a beginner.

  • Need help for the structured data to SEO/Google webmaster section...

    I finished my Adobe Muse (www.redoaklegalpc.com) site and he has published on (online marketing) Business Catalyst and added the site on Google for webmasters... I downloaded my my sitemap.xml and had indexed pages. I've added the appropriate tags (H1, H2, H3, etc.), metadata, robot.txt and image assets. I edited the properties of page on all pages... but for some reason any Google still cannot read my pages. I use police Mako, which is listed as a 'web-safe' police When I shoot to the top of my site in the section of structured data, it contains no text and appears as images that are missing. (see image below) The text on the muse has no small image box in the corner, so it seems that I am using the html text and exporting is not the text as an image... So now I'm stuck. How can I do to make my text appears in Google so I can use the data marker to help Google to create site links, etc. ?

    google webmaster image not working.jpg

    Here's a similar thread which should clarify your doubts about Google Sitelinks - http://forums.adobe.com/message/5409377.

    Thank you

    Vinayak

Maybe you are looking for

  • How can I get rid of Thurderbird advertising at the bottom of the screen of my email?

    Two days ago, when I opened my e-mail, instead of my e-mail lists, fill my screen, I now a kind of advertising Thunderbird filling about 1/4 of my screen at the bottom of my emails. How to get rid of him? I have no use for it. Thank you

  • In the Edition of Photos view, mouse slides without discernment

    When you try to edit a photo often the mouse glides to the next or previous photo. When you click on the photo to return to the display of the album, the mouse that often takes as a gesture of shot and moves to the next or previous photo. I disabled

  • Looking for people dosen't work on android Tablet

    When I press the button "Add people" on Skype in my android tablet, it will cook in the oven at the old page and no research or keyboard option appears. And it is a version of newly installed Skype. What can I do?

  • Equium A60 - Max HARD drive?

    Hey, forum noob here. I know this has been asked before (see [here | http://forums.computers.toshiba-europe.com/forums/thread.jspa?messageID=119435&#119435], [here | http://forums.computers.toshiba-europe.com/forums/thread.jspa?messageID=81428&#81428

  • How to create Hlp files with labwindows 9.0

    Hello I used to create the dll with Labwindows 8.5 and use them with TestStand... The advantage is that with the help file, I can add information to the Fp file and loading the DLL with TestStand, the "?" button to open the help file... But the probl