Hi John
The add-in is pretty complex so it isn't that easy to share the code. However, I've just spent some time creating a test add-in stripping out my code to the bare minimum which has helped me track down the cause of the issue.
It looks the issue is caused by a progress bar I have implemented. The button on the ribbon bar now simply calls the following sub:
Public Sub GetActivePresentation()
' display progress bar
With frmProgressBar
.ProgressBar1.Value = 0
.ProgressBar1.min = 0
.ProgressBar1.max = 20
.Caption = "Progress"
.lblMessage.Caption = "Calculating. Please wait..."
End With
frmProgressBar.Show vbModeless
MsgBox ActivePresentation.FullName
frmProgressBar.Hide
End Sub
If I remove the frmProgressBat stuff, ActivePresentation.FullName gives me the correct result but if I leave it in, ActivePresentation.FullName always gives me the name of the first presentation I opened.
At the moment, I'm assuming that the window my progress bar is in is associated with the first presentation somehow rather than the actual active presentation.
Now that I've worked out it's the progress bar that's the problem, hopefully I'll be able to find a work-around to it.
Julie