what is the best way to populate a power point slide depending on the results of multiple comboboxes? RRS feed

  • Question

  • I have managed to populate a series of comboboxes depending on the inputs of previous comboboxes. However, I now want to populate the slide depending on the user's inputs in the comboboxes. Depending on the choices the user makes, the slide would make recommendations in 4 different text boxes (not sure if I should use ActiveX textboxes or regular text boxes) and a few bar graphs (currently shapes made in power point). Are there any ideas on the best way to tackle this presentation?
    Any help is greatly appreciated.
    Monday, June 17, 2013 8:15 PM

All replies

  • I have never tried adding ActiveX text boxes to a slide with a procedure; however, I have added shapes without any issues.

    I use the AddShape method of the slide's Shapes collection.

    There is also a AddTextBox method. If you want to be more specific with the type of shape added.

    The Text property will be in the Shape's TextFrame.TextRange object. (Some properties may be in the TextFrame2 object.

    Wednesday, June 19, 2013 1:45 PM
  • Thanks for your reply!

    I have finally figured out how to populate the textboxes. 

    The only problem I am having is that once I populate the textboxes with the text I want, I want the text to autosize so it fits.  I've been using this:

    With C.TextFrame2
    .WordWrap = True
    .AutoSize = msoAutoSizeTextToFitShape
    .TextRange.Text = string

    End With

    but unfortunately it only autosizes once I exit to normal view mode, and I need it to autosize while it is in presentation mode.

    Wednesday, June 19, 2013 9:27 PM