|
From: Steve Rindsberg on 14 Feb 2005 09:45 In article <ud4xwfsEFHA.732(a)TK2MSFTNGP12.phx.gbl>, Lance Wynn wrote: > You may want to look into the TypeLib Information library (tlbInf32.dll). I > don't know how well it will work through VBA, but it should do fine, VBA is > just like any other ActiveX language I think. You can probably get at the needed info this way once you know which DLL or TLB/OLB file stores it. It'd probably only take a day or so longer to get it all working than it would to type in the 20 or so CASE statements needed to handle it directly in PPT/VBA. ;-) If you needed to work with lots of constants in a more general context, no question, this'd be the elegant way to fly. -- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================
From: Shyam Pillai on 14 Feb 2005 23:28 Look at the link below: FILE: Tlbinf32.exe : Help Files for Tlbinf32.dll http://support.microsoft.com/?scid=kb;en-us;224331&spid=3042&sid=global Also visit www.cpearson.com for Tlbinf32 examples on the topic. -- Regards Shyam Pillai http://skp.mvps.org/ "Jeff" <eatmy(a)grits.com> wrote in message news:%23hJ78lrEFHA.2176(a)TK2MSFTNGP15.phx.gbl... >I have a powerpoint slide with a table. The following code returns the >value 19 which indicates the > shape is a table > > MsgBox ActivePresentation.Slides(1).Shapes(1).Type > > The shape types are enumerated under the MsoShapeType class and the value > of 19 is assigned to > msoTable. Is there a simple command that will return "msoTable" instead > of it's value of 19? > > Thanks... > > Jeff > >
From: Jonathan West on 15 Feb 2005 06:19 Hi Jeff, MZ-Tools 3.0 (free download from http://www.mztools.com/v3/mztools3.htm) includes a "Select Case Assistant" If you position the cursor on a Select Case statement where the variable given is an Enum, then the Select Case assistant will display a dialog listing all the possible values for the enum, allowing you to pick which one(s) to include in the block. You can then put the necessary code below the relevant Case statements to return the name of the enum. -- Regards Jonathan West - Word MVP www.intelligentdocuments.co.uk Please reply to the newsgroup "Jeff" <eatmy(a)grits.com> wrote in message news:OqcVYCsEFHA.3840(a)tk2msftngp13.phx.gbl... > WOW, thanks for the fast reply! (I read your book, by the way.) I'm > writing a procedure that will > list all the shapes in a given presentation. Right now, the only way I > can figure to do it is to > retype all the mso shape constants into a Select Case statement. I was > hoping there was a better > way to work with an enum type without having to type all those constants > into a VBA procedure. > > I wrote a simple Access program that gives multiple choice quizzes and I > wondered if I could do the > same thing in Powerpoint. Your book came out just in time and it was fun > reading, but unfortunately > it was made for total beginners who only have a handful of questions to > present instead of hundreds > like I have. All my questions are in an Access table. I don't know if I > should write it all in > Powerpoint or do it in Access and call the Powerpoint objects when needed. > I'd rather just do it in > Powerpoint. Seems like it would be less clunky that way. Do you know > anyone who's done a multiple > choice quiz program in Powerpoint where the questions are retrieved from > an Access table? > > Jeff > > "David M. Marcovitz" <marcoNOSPAM(a)loyola.edu> wrote in message > news:Xns95FD8095C8611marcoNOSPAMloyolaedu(a)207.46.248.16... >> I don't know for sure, but I don't think that is possible. I believe that >> the compiler automatically converts any constants (like msoTable) to >> their corresponding value (19 in this case). When it is running, >> PowerPoint/VBA has no way of knowing that the 19 it is looking at came >> from msoTable instead of msoSomethingElse. You can, of course, compare >> the value returned to msoTable, rather than 19 as in >> >> If ActivePresentation.Slides(1).Shapes(1).Type = msoTable Then >> msgBox "Look ma! It's a table, an msoTable, that is." >> Else >> msgBox "This ain't no darn table." >> End If >> >> --David >> >> -- >> David M. Marcovitz >> Director of Graduate Programs in Educational Technology >> Loyola College in Maryland >> Author of _Powerful PowerPoint for Educators_ >> http://www.loyola.edu/education/PowerfulPowerPoint/ >> >> "Jeff" <eatmy(a)grits.com> wrote in >> news:#hJ78lrEFHA.2176(a)TK2MSFTNGP15.phx.gbl: >> >> > I have a powerpoint slide with a table. The following code returns >> > the value 19 which indicates the shape is a table >> > >> > MsgBox ActivePresentation.Slides(1).Shapes(1).Type >> > >> > The shape types are enumerated under the MsoShapeType class and the >> > value of 19 is assigned to msoTable. Is there a simple command that >> > will return "msoTable" instead of it's value of 19? >> > >> > Thanks... >> > >> > Jeff >> > >> > >> > >> > >
From: brian on 20 Feb 2005 11:26 Also faster is to copy the sample code Shyam, Steve and I wrote to determine the .type. It's at http://www.rdpslides.com/pptfaq/FAQ00008.htm Brian Reilly, PowerPoint MVP On Tue, 15 Feb 2005 09:58:41 +0530, "Shyam Pillai" <shyam(a)asia.com> wrote: >Look at the link below: >FILE: Tlbinf32.exe : Help Files for Tlbinf32.dll >http://support.microsoft.com/?scid=kb;en-us;224331&spid=3042&sid=global > >Also visit www.cpearson.com for Tlbinf32 examples on the topic.
From: Steve Rindsberg on 20 Feb 2005 07:49 In article <8geh11d03uk1ddrb3anf4v29rv0bnjtpqm(a)4ax.com>, wrote: > Also faster is to copy the sample code Shyam, Steve and I wrote to > determine the .type. > > It's at http://www.rdpslides.com/pptfaq/FAQ00008.htm Ah, right. I just updated that to include a few object types introduced more recently and also to fix it so it doesn't hurl in PPT 97 when it runs into stuff like msoScriptAnchor, which 97 don't know from. Any msoWhatsit values over 17 are treated as numerics, not constants now. Kinder. Gentler. > > Brian Reilly, PowerPoint MVP > > On Tue, 15 Feb 2005 09:58:41 +0530, "Shyam Pillai" <shyam(a)asia.com> > wrote: > > >Look at the link below: > >FILE: Tlbinf32.exe : Help Files for Tlbinf32.dll > >http://support.microsoft.com/?scid=kb;en-us;224331&spid=3042&sid=global > > > >Also visit www.cpearson.com for Tlbinf32 examples on the topic. > ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================
First
|
Prev
|
Pages: 1 2 Prev: Double clicking in PowerPoint Next: how to animate one word in a bulleted sentence |