create new field

S

Sue Mosher [MVP-Outlook]

Check your macro security settings (Tools | Macro | Security). VBA code won't run if it's set to high, which is the default. Restart Outlook if you change it. I keep mine set to Medium so I get an authorization prompt that lets me know that VBA has kicked in.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thanks for the path. ("macro security" wasn't capitalized, so I thought you
meant overall security. And I didn't realize that the VBA script was a
macro.)

Ok. I’ve changed my Macro Security to medium. Closed and Reopened OL.
Tried “Enable …†Closed and Reopened OL.
Tried “Disable…†Closed and Reopened OL.
Went back to the VBA screen. Set (General) to “colDelItems.†And
(Declarations) to
“ItemAdd.†Closed and Reopened OL.

Nothing has changed in my Deleted Items screen.

When I went back to the VBA screen,(General) and (Declarations) had reverted
to “(General)†and “(Declarations).â€

What next? Thanks for all your patience. I have time to mess with this
right now; I think it will prove to have real value in the future. When I
need this function, it is always a moment of stress, if not crisis.
 
G

Guest

Is there a bootstrap for imagination?

Brian Tillman said:
And on mine, it seems to show exactly that. I just added the "Modified"
date to my Deleted Items folder and deleted two items at 1:06 PM that I
received at 12:17 and 12:22 PM respectively. The Modified date shows "1:06
PM", just as I would expect.



I don't have access to OL 2002 at the moment, so I used Outlook 2003. I
usually don't save sent items, but I added the Modified Date to my Sent
Items folder (so I could see it prior to deleting an item) and then sent
some messages. The Modified date as displayed in the Sent Items folder
certainly did not match the Sent date (the Modified date was about a minute
later that the Sent date, as I would expect in many cases) I then waited a
while and then deleted the items and examined the Deleted Items folder.
Indeed, the Modified date changed to be the date I deleted the items (i.e.,
the date/time matched the point they were placed into the Deleted Items
folder). So, as I suspected, at least for OL 2003, the modified date makes
a reasonable approximation for the date and time of deletion. I can't
imagine that it's any different for OL 2002.
 
G

Guest

Oh, I've also made a new deletion. It appears in Deleted file, with "none"
in the "Deleted" column.
 
S

Sue Mosher [MVP-Outlook]

You might want to test whether any VBA code is running at all. You can try running a simple macro like this:

Sub HelloWorld()
MsgBox "Hello world!"
End Sub

Paste that into your VBA module, put the cursor inside it, then press F5.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

"put the cursor inside it, then press F5" ??

Aha. Now we are getting somewhere. I went back and did that with the first
script you gave me. And, aha again: I hadn't been here before - that's why I
didn't suspect it was a macro.

Another piece of info I'm missing: what are the rules for naming a macro?
It doesn't like "deleted item date stamp" for a name.

Thanks, Sue!
 
G

Guest

Oh-oh.
I'm working in Word.
Just got a Microsoft Visual Basic error message:

Run-time error '91': Object variable or With block variable not set.

I don't know enough to understand the Help option. My other options are End
or Debug.

What shall I do?
 
S

Sue Mosher [MVP-Outlook]

Ah. If you want to write code that responds to Outlook events, you need to write that code in Outlook's VBA environment, not Word's.

When you get an error, choose Debug. That will put you into the VBA development environment with the problem statement highlighted. If you need help understanding the cause of the error, copy that highlighted statement and any above it that look like they might be relevant and paste it into a message in any of the forums for discussing Outlook VBA (see http://www.outlookcode.com/d/vb.htm#discuss)

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Another piece of info I'm missing: what are the rules for naming a macro?
It doesn't like "deleted item date stamp" for a name.

A VBA procedure name must be a single word that begins with an alphabetic character.

If you're new to Outlook VBA coding, these web pages should help you get some more practice:

http://www.winnetmag.com/Articles/Index.cfm?ArticleID=21522&pg=1
http://www.outlookcode.com/d/vb.htm

Technically, VBA is not a scripting language, and "macro" refers only to a Public Sub procedure in VBA that has no arguments. Those, by the way, are the only types of VBA procedures you will see in Macros list on the Commands tab in View | Toolbars | Customize.

That's normal for when you first start VBA. It reflects where your cursor is in the code window.

I know what you mean! Time for poking around is essential. There never seems to be enough of it, though.
 
G

Guest

RE: VBA error '91':

I can't work in Word, and it won't let me open nother copy of Word, so I
have to do SOMETHING. I can't understand HELP. When I selected DEBUG, the
following line highlighted: Selection.TypeText Text:="MOM"

Does that help?
 
G

Guest

So sorry about all the confusion. I guess I am not careful about which of
your messages I am in when I reply. Where should I be to make a second reply
to one of your messages (like this)?

Anyway. VBA error message 91. Disregard that entirely it has nothing to do
with this issue. It is an old macro that I created about a year ago. I must
have inadvertently hit the key-command for it. I'll worry about that later.
Sorry.
 
S

Sue Mosher [MVP-Outlook]

To stop the execution of the current code and get out of "break" mode, choose Run | Reset.

Error '91' is an "object required" error. A text string like "MOM" isn't an object, but Selection is an object. But without seeing the larger context of the procedure where that statement appears, it would be tough to say just what the problem is.
 
G

Guest

PS

I just went back thru to put a check by each of your previous posts, and
found one of yours that I had missed, explaining everything that I needed.

"She wrote the book!"

Hooray!
 
G

Guest

I love my new "Deleted" column! To be warm and fuzzy: I am comforted, every
time I notice it.

I'm going to push my luck: Is there any way to avoid being asked whether I
want to Enable or Disable macros everytime OL2002 opens?
 
S

Sue Mosher [MVP-Outlook]

Yes, there are two ways to do this. One is to set macro security to Low, which is not recommended. The other is to use a tool called Selfcert.exe that comes with Office to generate a digital certificate that you can use to sign your VBA project. After you do that, youi can set macro security to High. See http://www.outlookcode.com/d/vb.htm#selfcert for more information.
 
G

Guest

excellent. ok. so I followed the processes. I thought I had done
everything right, and still got the alert, even after a full reboot.

So I went back thru the process. When I got to Tools/DigSign, I found
Shows: Current Vba proj [no cert] and Sign as [<my name>].

I clicked the CHOOSE button, and selected the one "intened for Code
Signing." Clicked OK.

I clicked VIEW: and found "issued to" and "issued by" both to be my name.
Valid until 1/1/11. Sounds good. (I'm pretty sure that's what I saw the
first time around too)

OK.
FILE/SAVE.
Save? YES.

Closed and reopened OL2002. Was still asked to ALLOW macros.

Verified that Macro Security was still set to MEDIUM. It was.

Rebooted. Was still asked to ALLOW macros.

What did I miss?

Thanks for all your patience.
 
G

Guest

In the list of posts and replies, what does the little right-pointing arrow
to the left of a post indicate?
 
B

Brian Tillman

stephanie said:
I love my new "Deleted" column! To be warm and fuzzy: I am
comforted, every time I notice it.

All that work when I've already demonstrated that the Modified date is
probably sufficient.
 
G

Guest

Well, of COURSE. There it is: The little check box that sdays "always trust
this source." Thanks! And so-long till whenever!
 

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