Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FullName of PPT Application project (PPT97/SR2)

    How can I get the folder-path that holds my curent application?

    I'm looking for the equivalent of (Word) MacroContainer.Path.

    I've searched the VBA forum, and the closest I found was this post.

    The code below tells me the Name of my project, but it's just that - the identifier assigned to the project. It's not the name of the file holding the project, let alone the FullPath of the file holding the project, and it's that FullPath equivalent that I want.

    <pre>Sub TES2T()
    Dim strName As String
    strName = Application.VBE.ActiveVBProject.Name
    MsgBox strName
    End Sub
    </pre>


    (I habitually store data relevant to my application in the folder that holds the application, all neat and tidy-like)

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

    Re: FullName of PPT Application project (PPT97/SR2)

    I have PowerPoint 2002, so the following may not apply to PowerPoint 97.

    The VBProject object has a FileName property, for example Application.VBE.ActiveVBProject.FileName. Since you have lots of utility routines, it should be easy to extract the path from this.

    The Presentation object has a property Path, for example ActivePresentation.Path. Path is also a property of the AddIn object.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FullName of PPT Application project (PPT97/SR2

    > The VBProject object has a FileName property, for example

    (Sigh) But not in '97. (I know, time to upgrade!).

    The good news, I suppose, is that the PPT object is being upgraded.

    I tried my customary trick of setting an object to the "thing" being investigated, and seeing if there were any clues in the Locals Window. Nada (attached).

    <pre>Sub TES2T()
    ' Dim strName As String
    ' strName = Application.VBE.ActiveVBProject.Name
    ' strName = Application.VBE.ActiveVBProject.FileName
    ' MsgBox strName
    Dim p
    Set p = Application.VBE.ActiveVBProject
    End Sub</pre>


Posting Permissions

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