Consulting

Results 1 to 12 of 12

Thread: VBA: Displaying the Template Gallery

  1. #1

    VBA: Displaying the Template Gallery

    Hey wats up all. Im designing my own form(pretty much a custom wizard), and what I'm tryin to do is get the (or a) template gallery to display so the users can pick the template they prefer. I can already change templates through a radio button or command button, but I want the gallery to show up so the users, who don't know powerpoint, can see the thumnails and apply a template.

    I don't know if this is possible but is there any way to do this or something like it?

    Thanks ahead of time.

  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Hi and welcome to VABX

    Do you want to display installed templates on the userform or just activate the Slide Design task pane? (I can't remember how there are accessed in 97 - that would have to be considered)
    K :-)

  3. #3
    Probally just the design pannel. So when they click a button it pops up

  4. #4
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Well it would be nice if it were easy but I'm not so sure...

    Office 2002 (XP) introduced the "Task Pane" which looks nice but has poor accessability for humans and code. It is a Commandbar object so you can display it with[VBA]CommandBars("Task Pane").Visible = True[/VBA]Unfortunately, you can't switch the view to the one you want. AFAIK, the only thing you can do is add a new file in the "New Presentation" pane.

    97 and 2000 will be a different prospect but I don't have access to them at the moment. (I've had to rebuild my PC and haven't got round to installing Virtual PC yet - will be next week tho, I've got some testing to do)

    Hope that's some help
    K :-)

  5. #5
    ok, but that command will online show it in the background in the deafult position..so i guess its one of those things we can't get to?

  6. #6
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    so i guess its one of those things we can't get to?
    I can't find any way into it so it looks that way.

    I guess if you've already got a custom wizard going and you can reliably find a path to your user's template directory, it would be quite simple to display them as a step in the process..?
    K :-)

  7. #7
    Oh alright thanks alot.

  8. #8
    New twist to the questions, is there way to invoke the browse option that shows up in the Template pane? I can do this operation for options that are in the tool bar. For example click the save button and the save as window appears, but now i was to do the browse button at the bottom of the Temaple pane? Have you ever heard of such a time or is it possible?

  9. #9
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    This may be a start for you....from the help files:
    [VBA]
    Sub ShowFileDialog()
    Dim dlgOpen As FileDialog
    Set dlgOpen = Application.FileDialog( _
    Type:=msoFileDialogOpen)
    With dlgOpen
    .AllowMultiSelect = True
    .Show
    End With
    End Sub
    [/VBA]
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  10. #10
    Ok nice, Im going to try that. Once thing I did yesterday was automatically generate the names of all the .pot files in the template folder, and put them in a drop down box. I have that working. The only thing is i need to modify the name that shows up in the menu. Its showing Balance.pop rather than just balance. If you have any ideas on doing this i accept help..hahah. Thanks for the help

  11. #11
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    You could assume your filename has a 3 letter extension and just take off the last 4 characters[VBA]'where strName is holding the filename
    strName = Left(strName, Len(strName) - 4)[/VBA]or you could use more defensive programming and check first[VBA]p = InStrRev(strName, ".")
    If p <> 0 Then strName = Left(strName, p - 1)[/VBA]
    K :-)

  12. #12
    Thanks alot. I used the more defensive programming aproach.

Posting Permissions

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