Problems opening a Document stored in Outlook

  • Thread starter Thread starter chfaPrv
  • Start date Start date
C

chfaPrv

Hi,

the situation is as following:

I have documents (word, excel) stored in the public folder for
general use network wide. To simplify the access I'll get these
objects via a MAPIfolder in a macro running under word. As far it
works fine. The user Form for the selection shows me the documents in
the list for selection.

And here starts the problem (or bertter 2):
after selection, the user is to press a button for opening a selected
document. The routine, very simplified, is as this:

sub cmdOpenDocument_click()
dim templateFolder as Outlook.MAPIfolder
...
...
templateFolder _
.Items(Me.lbxTemplates.ListboxIndex+1) Display
...
end sub

The execution displays a security advice BEHIND the word document and
by this it seems as the task is frozen.

Question 1:
how to put this securty advice in toppest front so the user can click
the buttons offered in this message box

Question 2:
I assume I have clicked this advice away by accident It doesn't show
up anymore. How to reactivate it ??

Thanx a Lot for Help
Chris
 
You're talking about the Security Dialog I assume?

Outlook "Object Model Guard" Security Issues for Developers:
http://www.outlookcode.com/article.aspx?id=52

You can't set that dialog to the foreground without using some Win32API
calls (Google SetForegroundWindow). You should also implement some error
handling around any calls that will generate that dialog to handle instances
where the user declines it.
 
Back
Top