Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding to GRUSRGAL.GRA (Office 2000/XP)

    I have a GRUSRGAL.GRA file which contains chart formatted types that I created, to be sent to other users. However, many of these users do have their own GRUSRGAL.GRA file which contain their own user defined formatting, and there are some users which simply don't have this file on their pc because they have never made a user defined chart. So I have a dilema which I am not sure how to solve.
    Basically what I want to achieve is this:
    1. Best case scenario take my GRUSRGAL.GRA file and merge it with the other users files
    2. I have a ppt file which includes all the charts that have been added to the GRUSRGAL.GRA file, slide by slide. I could send this ppt file to the users and through a macro (?) all the user defined types will be copied to the other users GRUSRGAL.GRA files (appended basically), so that their original file does not get overwritten.
    If the file does not exist on their computer, it will be created and as in step 2, the chart types will be addedd to the file.
    Is this a realistic request, can this be done - has this already been done at all? I searched in Google for anything relevant about the GRUSRGAL.GRA file, but all I could come up with so far is that apparently the first case scenario is not possible.

    I appreciate any help I can get as I am really stuck with this project and don't know how to handle it. I also tried to record a macro, but when I get to the chart types/user defined, the macro doesn't record anything...

    K.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding to GRUSRGAL.GRA (Office 2000/XP)

    I don't know how you want to name the custom chart types, but the following code will run through all slides in the active presentation, and add the chart assumed to be in the first shape on the slide to the gallery. If the user doesn't have custom charts yet, the file will automatically be created, otherwise, the charts will be added.
    <code>
    Sub AddCustomCharts()
    Dim i As Integer
    For i = 1 To ActivePresentation.Slides.Count
    ActivePresentation.Slides(i).Shapes(1).OLEFormat _
    .Object.Application.AddChartAutoFormat "MyName" & i
    Next i
    End Sub
    </code>
    This macro will name them simply MyName1, MyName2, etc.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding to GRUSRGAL.GRA (Office 2000/XP)

    Thanks a lot for your quick reply. I ran the macro, and it added the very first chart, however it stopped there. I am attaching here a sample ppt file, maybe it is easier to see why it doesn't continue?
    Just a thought on the names, is it possible to give the chart types particular names, rather than the one specified in the macro, so that the users when they work on their own presentations and want to quick-format their own chart, will know which custom type to select from available names (ex. 'trended line' if it's a line chart, 'pie' if it's a pie chart, etc)

    Thanks again,
    K.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding to GRUSRGAL.GRA (Office 2000/XP)

    Try this:
    - Select all slides.
    - Change the slide layout to Title and Content.
    - Set the title for each slide to the name you want the custom chart to have.
    - Change the macro to the following:

    Sub AddCustomCharts()
    Dim i As Integer
    For i = 1 To ActivePresentation.Slides.Count
    With ActivePresentation.Slides(i).Shapes(1).OLEFormat.O bject.Application
    .AddChartAutoFormat _
    ActivePresentation.Slides(i).Shapes(2).TextFrame.T extRange.Text
    .Quit
    End With
    Next i
    End Sub

  5. #5
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding to GRUSRGAL.GRA (Office 2000/XP)

    Hans, so far this is perfect! I am sending the file to a few users to test it on their computers, to be sure it works in different environments, and will let you know of the outcome of if they get a problem with it, etc.
    Once again big thanks!
    K.

Posting Permissions

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