Still Current Folder.

  • Thread starter Thread starter Artem
  • Start date Start date
A

Artem

I guess I'm loosing it. I thought Item.FormDescription was
able to give me the folder name. I didn't realize I had
Item.Save before that. Sorry about the confusion, but the
question still stands and that is:

I published a form to multiple Public Folders. I would
like to get the name of folder this form is being launched
from. I tried using Item.Parent property. However, as long
as Item is not saved this property returns "Inbox". As
soon as I save the Item then it returns the folder I'm
looking for. My challenge is that I need the folder name
(or folder object for that matter) without saving the item.

Any idea how can I retrieve the name of current public
folder?
 
Give a try, altough it may look funny:

msgbox item.parent
strID=item.entryID
msgbox item.parent

I'm not quite sure, if it works for mailitems but it definitely works for
all other items (tested until OL2k).

Found at www.slipstick.com
 
I published a form to multiple Public Folders.
A form should only be published in ONE place! You are likely causing
yourself strange problem in the future by doing this. If you get
intermittent forms corruption messages, it is likely caused by having
it published in more than one place.

If you want to use the form in several folders, then you should publish
it to the Organization forms Library. If, you really, really, need to
have the folder of origin, then you should take the basic form that is
published to the Org Library, go into design mode, and hard-code the
name of the folder, then publish to that folder. Do this for each
folder. Of course, this makes maintenance of the form more complex,
but there is always a price to pay. But the rule is: publish a form
in only one place.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 
Alternate method if you're launching a form from a public folder:

Function Item_Open()
Set objFolder = Application.ActiveExplorer.CurrentFolder
End Function
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Yes. That one works too and it's cleaner as well.

I missed the CurrentFolder property when I was trying
ActiveExplorer. I was using
Application.ActiveExplorer.Parent which was
returning "Inbox".

Thanks
-----Original Message-----
Alternate method if you're launching a form from a public folder:

Function Item_Open()
Set objFolder = Application.ActiveExplorer.CurrentFolder
End Function
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers



"Artem" <[email protected]> wrote in
message news:[email protected]...
 
Thanks for your concern. I received two proper answers
from others. I would suggest you review their postings as
well.
-----Original Message-----
I published a form to multiple Public Folders.
A form should only be published in ONE place! You are likely causing
yourself strange problem in the future by doing this. If you get
intermittent forms corruption messages, it is likely caused by having
it published in more than one place.

If you want to use the form in several folders, then you should publish
it to the Organization forms Library. If, you really, really, need to
have the folder of origin, then you should take the basic form that is
published to the Org Library, go into design mode, and hard-code the
name of the folder, then publish to that folder. Do this for each
folder. Of course, this makes maintenance of the form more complex,
but there is always a price to pay. But the rule is: publish a form
in only one place.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp? FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA


.
 
Back
Top