enhancing rdp's ExportNotesText

G

Guest

Hi,

Under Mac OS X, I've installed the VBA ExportNotesText code shown at
http://www.rdpslides.com/pptfaq/FAQ00481.htm
http://www.rdpslides.com/pptfaq/FAQ00031.htm

and I'd like to make a few enhancements to it.

I want the textfile to end up on the Desktop, not in the PowerPoint
Directory, I'd like to anchor the floating button to an existing toolbar, and
I'd like the code to be portable so that it can be installed as an add-in
from a server to any Mac in the office.

I've not been able to figure out the generic way to say "Desktop" in VBA; I
only seem to be able to use a specific drive/user path.

And I have no idea how to anchor the button. For some reason, the Visual
Basic Help files are being installed from the Word X CD we have.

Anyway, I'd appreciate any pointers, thanks very much.

--Eric
 
S

Steve Rindsberg

Eric theise said:
Hi,

Under Mac OS X, I've installed the VBA ExportNotesText code shown at
http://www.rdpslides.com/pptfaq/FAQ00481.htm
http://www.rdpslides.com/pptfaq/FAQ00031.htm

and I'd like to make a few enhancements to it.

I want the textfile to end up on the Desktop, not in the PowerPoint
Directory, I'd like to anchor the floating button to an existing toolbar, and
I'd like the code to be portable so that it can be installed as an add-in
from a server to any Mac in the office.

On the whole, installing an addin as one file shared by lots of computers is a
bad idea. PPT doesn't really like to share them.
I've not been able to figure out the generic way to say "Desktop" in VBA; I
only seem to be able to use a specific drive/user path.

Desktop is actually at Macintosh HD:Users:UserName:Desktop

The root drive name might change and UserName will change for each user. I
don't believe VBA offers any direct access to this info.

Application.Path gives you the path to the PowerPoint executible; parse
everything to the left of the first : character to get the name of the root hard
drive:

Mid$(Application.Path,1,InStr(Application.Path,":")-1)

I'd be very surprised if a bit of Applescript couldn't tell you the path to the
User's directory. Paul Berkowitz is one of the Mac MVPs; you may find him in
Public.Mac.Office.Powerpoint or one of the Mac Word groups. If he doesn't know
it about AppleScript, it isn't meant for mortals to know. Oh, and yes, you CAN
call Applescript from VBA or vice versa.
And I have no idea how to anchor the button. For some reason, the Visual
Basic Help files are being installed from the Word X CD we have.

Best bet is not to. Let the user put it where they want it, otherwise everybody
who uses your addin will hate you as much as they do Adobe. And they probably
 
G

Guest

Steve Rindsberg said:
On the whole, installing an addin as one file shared by lots of computers is a
bad idea. PPT doesn't really like to share them.

My goal was not to share the file, just to make it available for general use
within our group. In particular, our Director has laptops and desktops at
several locations, and making an add-in available in a central location
greatly aids in its deployment. It would be copied onto the local machine,
then installed.
Desktop is actually at Macintosh HD:Users:UserName:Desktop

Right. But users commonly rename their hard drives, so this seems likely
to break. The initial pool of machines all have different hard drive names.
Application.Path gives you the path to the PowerPoint executible; parse
everything to the left of the first : character to get the name of the root hard
drive:

Mid$(Application.Path,1,InStr(Application.Path,":")-1)

Thanks; that helps a lot.
Best bet is not to. Let the user put it where they want it, otherwise everybody
who uses your addin will hate you as much as they do Adobe. And they probably
know where to find you. <g>

Yeah, but that snippet of code always pops the button up in the same place,
and the function it serves will not be used frequently. I'd like my Director
to be able to put that button where he wants it to be, and have it remember
the location. Otherwise, it's going to get in his way, and he'll hate me as
much as...

Thanks again for the help and discussion.

--Eric
 
S

Steve Rindsberg

My goal was not to share the file, just to make it available for general use
within our group. In particular, our Director has laptops and desktops at
several locations, and making an add-in available in a central location
greatly aids in its deployment. It would be copied onto the local machine,
then installed.

No problem at all with that, then.
Right. But users commonly rename their hard drives, so this seems likely
to break. The initial pool of machines all have different hard drive names.


Thanks; that helps a lot.
Yeah, but that snippet of code always pops the button up in the same place,
and the function it serves will not be used frequently. I'd like my Director
to be able to put that button where he wants it to be, and have it remember
the location. Otherwise, it's going to get in his way, and he'll hate me as
much as...

I've lost track of which snippet, but it's probably one that deletes the
toolbar if it exists, then re-creates it? Or that deletes the toolbar at
shutdown and recreates at start up.

You can instead write the toolbar code like so, in general outline:

On Error Resume Next
Create the toolbar
If Err.Number = 0 Then
' The toolbar wasn't there to begin with, so add any needed buttons
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top