Using Delphi, and the InDesign automation object ("indesign

Using Delphi, and the InDesign automation object ("indesign.application"), I need to open a indd file, move to a bookmark and insert text or picture at that exact location. Any examples of such code I could start with?

Hi Bill,
Sorry to be so late getting to this thread!
If you want to add something to a page, or find an object that's on a page, you need a reference to the page. Simply displaying the page with ShowBookmark won't give you a reference to the page--InDesign scripting, for the most part, doesn't rely on the selection and current view in the way that Word scripting does (this is a good thing, but that's a topic for another day).
You had to have a reference to a page to create the HyperlinkPageDestination that you used to create the bookmark--but, if not, you can get a reference to the page using (VBScript form):
Rem Given a reference to an instance of InDesign "myInDesign"...
myInDesign.Bookmarks.Item("Description").ShowBookMark
Set myPage = myInDesign.ActiveWindow.ActivePage
In general, though, you probably don't need the bookmark and the whole "ActiveWindow" construct--just use the reference to the page itself.
Now that you have a page, you can put things on the page.
Rem Create a rectangle
Set myRectangle = myPage.Rectangles.Add
Rem Size and position the rectangle
myRectangle.GeometricBounds = Array("6p", "6p", "24p", "24p")
Rem Place a graphic in the rectangle
myRectangle.Place "c:\test.tif"
If you have a text frame on the page that has the label "myLabel", you can get a reference to the text frame and add text:
Set myTextFrames = myPage.TextFrames.Item("myLabel")
Rem myTextFrames will return an array--get the first item
Set myTextFrame = myTextFrames(0)
Rem Replace the text in the text frame:
myTextFrame.Contents = "This is some text."
Rem Or add text to the end of the text frame:
myTextFrame.InsertionPoints.Item(-1).Contents = "This is some additional text."
If you know that there is only one text frame with the label "Description" in the entire document, you can even say:
Set myTextFrames = myDocument.TextFrames.Item("myLabel")
Rem myTextFrames will return an array--get the first item
Set myTextFrame = myTextFrames(0)
...to get to it directly. If, at that point, you want to get at the page containing the text frame (and assuming that the text frame is not in a group, pasted inside text, or pasted inside another page item), you can use:
Set myPage = myTextFrame.Parent
Have you looked through the "Working with Documents" chapter of the InDesign CS3 Scripting Guide: VBScript and the associated scripts archive? I realize that you're using Delphi, but it doesn't look too difficult to convert from one to the other.
Thanks,
Ole

Similar Messages

  • HT2534 how do i use itunes and the app store without any credit card or gift card?

    i just got my iphone and i used to use itunes all the time before when downloading all songs were completly free, how do i use itunes and the app store to find free stuff to download without having to add a credit card or gift card with my account?

    Create a NEW account/ID for her using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before. Make sure you specify a birthdate that results in being at least 13 years old
      Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    More details of how:
      http://ipadhelp.com/ipad-help-tips-tricks/how-to-get-free-apps-from-the-app-stor e-without-a-credit-card/

  • TS3899 With Yahoo Mail, and anotare account (Inacap Mail), I can only receive mails but I can't send emails. I don't know if this is a problem of the iPad or it is a problem with yahoo mail, because using Gmail and the email of my job I don' have this pro

    With Yahoo Mail, and anotare account (Inacap Mail), I can only receive mails but I can't send emails. I don't know if this is a problem of the iPad or it is a problem with yahoo mail, because using Gmail and the email of my job I don' have this problem.

    Google them to confirm the settings that you need for the outgoing server, then check the setting you entered on the pad.  Pay real close attention to the outgoing server name, and port.  You may need to change in on the pad. 

  • I bought the Adobe student version of Photoshop and Premiere Elements a few months ago - and now I am trying to use it, and the serial number that I have is incorrect - or it is only the registration number or something? It says I should have been sent an

    I bought the Adobe student version of Photoshop and Premiere Elements a few months ago - and now I am trying to use it, and the serial number that I have is incorrect - or it is only the registration number or something? It says I should have been sent an email with the serial number once the product was registered - But I never received this email. If anyone is able to help me with this issue - that would be great. the registration number is: PEPEP6-5578-6450-8871-9107  I am using a windows based system

    If I were you I would first make sure CS6 was deactivated or signed-out. Then download Adobe's cleaner and remove cc, CS6 and any other creative  application installed including Creative Cloud desktop application.  Then install CS6 and use your CS6  serial number during the install to activate CS6 standard or extended which ever the serial number is for.   CS6 Version 13.0 should the be activated. That level of CS6 is extremely bug ridden so be sure to the use CS6 menu Help>Updates to get CS6 updates.  Windows should update to version 13.0.1.3 Mac to version 13.0.6.  Not Subscription CS6 version 13.1.2...
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • I purchased a used macbook and the other persons apple id information is still on this for example apple updates it wont allow me to update apps unless i am logged in with his email. how do i change that

    i got a used macbook and the other persons apple id is still connected to the macbook. for example i cant update apps unless i have his passwod but i dont wanna pay for apps such as iphoto and more. is there anything i can do? this is a macbook 13 inch late 2008 model

    You're going to have to purchase those apps for yourself. The seller shouldn't have left anything he had purchased on the computer when he sold it to you.

  • Can I sync two computers when one is using lion and the other snow leopard

    can I sync two computers when one is using lion and the other snow leopard

    will my data be shared well using Mobile Me?

  • I have just purchased a used 3gs and the previous owner hadnt reset it.

    I have just purchased a used 3gs and the previous owner hadnt reset it.
    So i did the reset and left it over night as this can take a few hours.
    This morning 10 hours later there is stillthe cirlcle going round in the centre of the screen.
    There is no sim card in the phone.
    What do i do now? please help?

    To make this phone truly yours, do a Restore as New...
    See this Support Article on Restoring your phone...
    http://support.apple.com/kb/HT1414

  • The disk containing your iPhoto library is running low on space.How is this possible? I have no photos and have never used iphoto and the program is up to date.

    How is this possible? I have no photos and have never used iphoto and the program is up to date. I try to import and drop my pictues into iphoto but nothing happens or I get above statement. Help please!

    Then it's a bogus message and indicates that the default library is damaged.
    Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Create Library' and use that one.
    Regards
    TD

  • What's that command again for moving a track and the pan automation?

    What's that command again for moving a track and the pan automation together?

    It's not a command but a menu item: "Lock curves to tracks".

  • Using iMovie and the voice over sound has stopped working?

    Using iMovie and the voice over sound has stopped working?

    Are these the internal speakers?
    Have you done a PRAM reset, CMD+Option+p+r...
    http://support.apple.com/kb/HT1379
    In fact, do 3 in a row, takes a bit of time.
    Intel-based Macs: Resetting the System Management Controller (SMC)...
    http://support.apple.com/kb/HT3964

  • I keep getting Alarm popups saying that it cannot send msg using the server null. I think I have disabled email (I use Gmail) and the calendar however I still get these popups and I can't close them?

    I keep getting Alarm popups saying that it cannot send msg using the server null.
    I think I have disabled email (I use Gmail) and the calendar however I still get these popups and I can't close them?
    How can I disable the Alarm popups?
    Thanks
    Brian

    OS X Mail: Troubleshooting sending and receiving email messages - Apple Support
    Google Mail recently implemented additional security measures "for your protection" of course. The manifestation of that may be the requirement to create a unique, "application-specific" password for each one of the various Google services you may use. That requirement probably includes Google Mail. So if the above Apple Support document doesn't resolve the problem, research Google's application-specific password requirements, and how to configure Mail to use it.
    I asked the Hosts to edit or obscure the email address in your post.

  • HT1222 Why my iphone 5 still cannot install this update? I've clicked the download and install button but it do nothing, im using wifi and the baterry is 100% but still, it do nothing when i've clicked! Help!

    Why my iphone 5 still cannot install this update? I've clicked the download and install button but it do nothing, im using wifi and the baterry is 100% but still, it do nothing when i've clicked! Help!

    Reset the phone (no data loss): Press both the home and power buttons for at least 10 seconds, releasing when the Apple logo appears.  After the phone restarts, try updating again.

  • I purchased a used iphone4 and the phone displays the previous owners apple id and prompts me for the previous owners password. how do i get rid of his info....and install my own apple id number?

    I purchased a used iphone4 and the phone displays the previous owners apple id and prompts me for the previous owners password. how do i get rid of his info....and install my own apple id number?

    Login to the app store with YOUR ID. You can't use the app store without an Apple ID. If there are apps on the phone that were purchased with the original owners ID, you do NOT own them. The owner had no legal right to give them to you and they are permanently tied to the ID that was used to purchase them.
    ...i was also allowed to purchase an apple network id for this phone...
    I have absolutely NO IDEA what you mean by that. You can not "purchase an apple network id".

  • I have been transfeing my DVD footage to I movie using handbreak and the spinning wheel of death has arrived and locked up I movie as I tried to import footage.  The message says, "Optimizing movies, processing event DVD" but I can't get out of it.

    I have been transfeing my DVD footage to I movie using handbreak and the spinning wheel of death has arrived and locked up I movie as I tried to import footage.  The message says, "Optimizing movies, processing event DVD" but I can't get out of it.

    Yes I held them down till the apple logo appears, then spinning wheel and repeated boot up process. I only knew it was going round in circles because the charging sound kept repeating every so many seconds.
    I am downloading iOS.5.0.1 now to do a complete factory restore. I hope this works. I have been looking online for hours for fixes and I have very little batter on it as its been spinning for hours now.
    Why do things like this happen? I am sat there watching tv and one minute the settings folder is there then its not! How does that happen? It just disappear? I hadn't moved it to another folder or deleted it, it just.... went!

  • How To Use GOOP and The VI Server?

    I created several VIs that work together to display images on a remote
    computer using a VI server. To make it easier to use I turned the several
    VIs into methods in a GOOP class. This works fine to display the images on a
    local machine.
    I then added more methods which call the existing methods via a VI server.
    This version will not run, even when the VI server is the local machine.
    The error it returns is "Object not valid." This comes from the object
    repository method that GOOP created automatically. I'm passing what appears
    to be a valid object reference, it seems that the object repository doesn't
    recognize it as valid. Of course the object repository is password protected
    and so I cant delve any deeper.
    Has anyone
    used a GOOP object over a VI server successfully? Is this even
    possible?
    TIA,
    Don

    You must be very careful because objects and refnums created on one instance
    of LabVIEW are local to that instance only. Objects created on one machine
    with the object repository are unknown to the other object repository
    running on the remote machine. You must pass the whole object data from one
    machine to the other, not only the refnum.
    Jean-Pierre Drolet
    "Don Brocha" a écrit dans le message news:
    1_er5.467$[email protected]..
    > I created several VIs that work together to display images on a remote
    > computer using a VI server. To make it easier to use I turned the several
    > VIs into methods in a GOOP class. This works fine to display the images on
    a
    > local machine.
    >
    > I then added more methods which call the existin
    g methods via a VI server.
    > This version will not run, even when the VI server is the local machine.
    >
    > The error it returns is "Object not valid." This comes from the object
    > repository method that GOOP created automatically. I'm passing what
    appears
    > to be a valid object reference, it seems that the object repository
    doesn't
    > recognize it as valid. Of course the object repository is password
    protected
    > and so I cant delve any deeper.
    >
    > Has anyone used a GOOP object over a VI server successfully? Is this even
    > possible?
    >
    > TIA,
    >
    > Don
    >
    >
    >

Maybe you are looking for

  • PI 7.1 and FTPS

    We have configured a scenario to get Credit Card files from American Express using the File adapter with FTPS. We have added the CA-certificate to the keystore and all seems to be allright (green traffic light on the communication channel monitor, no

  • Add FI document number to message M8 060 (MIRO)?

    Hi We have a user request to have the FI document no. added to the message when posting an invoice. The standard message shows only the MM document. The user claims that it took 7 minutes to change it at her previous employer, but I can't see any way

  • Source Sans Pro not displaying in 'Design' mode

    Hi All of a sudden Source Sans Pro is not displaying in the 'Design' mode in Muse. Its still able to preview in browser correctly. But obviously I need it to display correctly within the 'Design' mode in order to design. Can anyone help? Thanks

  • Setting up a LUKS partition to use a USB key

    Im playing with an old netbook I've been given, essentially practicing for when I get a new desktop. Anyway, I want to install Arch on a LUKS encrypted partition and have it unlocked at boot time using a key located on a USB key. This is what I did f

  • Adding option to "Add to favourite" to my webhelp skin

    Hi, I have a webhelp project to which I want to have a button in the skin that can enable me to add the current page to the favourite list.. I have found numerous options on the internet that provide options to add intenet pages to the list. However,