Automatic update of forms in a PF

F

Florian Rosch

Hi,
I'm having a mail folder in my Public Folders with a few items in it based
on a self-made form. This form contains a datefield and another field is
automatically set to YES or NO, depending on the date that is in this
datefield (expired or not).

Now I'm looking for a solution to open somehow all items in this folder and
save them again to automatically update this YES/NO field. How can I do
this? Can I add another item with another form that opens all items in this
folder, saves them automatically and closes them again? How should the code
look like for such a solution? Is it possible anyway?

Or is it possible to open, save and close all items automatically when I
open the folder itself?

Please give me a hint!
Thank you!

Florian
 
F

Florian Rosch

Now I've created a new form in this folder with a CmdBtn and this code:
------------------------
Sub CommandButton1_Click()
' Set cf to the current folder
Set CurFolder = Application.ActiveExplorer.CurrentFolder
' Loop through all of the items in the folder
For I = 1 to CurFolder.Items.Count
Set CurItem = CurFolder.Items.Item(I)
' Open Item
CurItem.Open
' Save the changed item
CurItem.Save
Next
MsgBox "Done."
End Sub
------------------------
I expected that I open this form, click on the CmdBtn and it opens all forms
in the current folder and updates the items when it saves the items, but it
does not :-(

Any ideas?

Thanks!
Florian
 

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