Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format embedded excel object in powerpoint using javascript

    New to this forum please help...

    Here is the situation -- I have a Powerpoint report generated from Brio (Hyperion Intelligence), This PPT report has lots of gra[hs and charts embedded in it. Now we are working on the formating of these embededded objects...Brio uses Java Script to communicate to these objects but there are some limitations that it is not able to go superscript a part of the datalabel of the embedded chart in powerpoint.

    Now the solution we thought is may be we can write an external script indepedent of brio that is called from brio and that will actually work on the active presentation on the system....that will go loop through the slides check for embedded excel objects in active powerpoint application and then go check and see if that chart has datalabels and then superscript the last 2 charecters of the datalabel...

    Seems like round about solution but I kind of have a hunch that it is possible... How? i donot know, need expert help here

    Please help me....
    Thanks

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Post some short example that you have problem with. Maybe someone would be able to help you.
    rm -f /

  • #3
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is the code below... FYI I am tring to work with this for the first time... I am not very familier with Java script &/ BRio. Brio is the tool that I am using to execute this code in... There are some known limitation to how much brio can interpret is my understanding, but if some one could change the code in red to javascript I will take it from there.


    var ADS = ActiveDocument.Sections;
    var ADS_RSU_S = ADS["Dashboard"].Shapes;

    var rCI = ADS_RSU_S["CiLabel"].Text;

    Console.Writeln(rCI);

    var oPPT = new JOOLEObject("PowerPoint.Application");
    oPPT.Visible = true;

    var oPPTPres = oPPT.Presentations.Open(sFile);
    oPPT.ActiveWindow.ViewType = 1;

    oPPT.ActiveWindow.View.GotoSlide(13);

    var myDocument = oPPT.ActiveWindow.Selection;

    //myDocument.SlideRange.Shapes.Item("Text Box 3").TextFrame.TextRange.Text = rCI;
    var txtRng = myDocument.SlideRange.Shapes.Item("Text Box 3").TextFrame.TextRange;

    var foundText = txtRng.Find("95%");
    foundText.Font.Bold = 1;
    //txtRng.Replace(Findwhat := "95%", Replacewhat := "90%");

    Do While Not oTmpRng Is Nothing
    Set oTxtRng = oTxtRng.Characters(oTmpRng.Start + oTmpRng.Length, _
    oTxtRng.Length)
    Set oTmpRng = oTxtRng.Replace(FindWhat:="like", _
    Replacewhat:="NOT LIKE", WholeWords:=True)


    This code above is what i want ot change to Javascript code... I have tried by doing the following ( commented out line ) above in Green

    Up to the green commented statement the code works perfectly... Please some one help me..

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,465
    Thanks
    0
    Thanked 634 Times in 624 Posts
    That code definitely isn't Javascript. It might be JScript.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    TNO
    TNO is offline
    Regular Coder
    Join Date
    Apr 2005
    Posts
    213
    Thanks
    2
    Thanked 1 Time in 1 Post
    Code:
    Do While Not oTmpRng Is Nothing
    Set oTxtRng = oTxtRng.Characters(oTmpRng.Start + oTmpRng.Length, _
    oTxtRng.Length)
    Set oTmpRng = oTxtRng.Replace(FindWhat:="like", _
    Replacewhat:="NOT LIKE", WholeWords:=True)
    The Above VBScript can be roughly translated as shown:

    Code:
    while (oTmpRng!=""){
    var oTxtRng = oTxtRng.Characters(oTmpRng.Start + oTmpRng.Length,
    oTxtRng.Length);
    var oTmpRng = oTxtRng.Replace(FindWhat:="like",Replacewhat:="NOT LIKE", WholeWords:=True);
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •