Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,370
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Macro Names (MSO 2003)

    I have some Macros that I transferred over from a backup.

    They work fine, except they have all been renamed.

    Now, instead of "Google" the macro is named "ThisOutlookSession.Google".

    Is there a way or place to rename these?

    Regards,
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Macro Names (MSO 2003)

    Chuck, the VBE has a Find-&-Replace function which works at the Module level - in your case I suspect that the subs were placed in the ThisOutlookSession module - for housekeeping I recommend that you only have Event related subs in that Module; put the rest in standard modules.

    I'm at a loss to know why this would happen - I have never experienced it.
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,370
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Macro Names (MSO 2003)

    John:

    No fair talking to me like I know what I'm doing...

    I get that you're speaking of proper form and protocol...

    But how do I move subs from the ThisOutlookSesson to standalones? 'Cause I just created them in Outlook, and that's where Outlook stuck them. I then had just restored the vbaproject file from a backup...If I move them (how?) Then will they show up as accessible in the "Macros" section of Outlook?

    Regards,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro Names (MSO 2003)

    In Outlook, activate the Visual Basic Editor (Alt+F11)
    Expand the tree in the Project Explorer (the Windows Explorer-like treeview on the left hand side) until you see ThisOutlookSession.
    Double click ThisOutlookSession.
    If you see any code there:
    - Select all of it (Ctrl+A)
    - Cut it to the clipboard (Ctrl+X)
    - Select Insert | Module to create a standard module.
    - Paste the code into it (Ctrl+V)

  5. #5
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,370
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Macro Names (MSO 2003)

    Hans:

    Okay, now they're all in a new project, and it cleared up the name issue by itself. Nice, but now I of course don't know why or how....

    I still have a bit of the same problem though, Hans. It's all (both the "This OutlookSession" the Module1that was created when I moved the macros. But will they just name themselves sequentially? Do I have any control over this part of the process? I don't see where there is any reference to the Module name. When I right-click, it always talks about project 1 properties... The entire project, rather than a part of it.

    So in a larger project where there are many modules, how do you keep track if it's just Module1, Module2, etc.?

    Also, no the macros are all disabled -- again. How do I cure this one?

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro Names (MSO 2003)

    ThisOutlookSession is a fixed name. You cannot remove this module or change its name.

    Modules you create by selecting Insert | Module are named Module1, Module2 etc. by default, but you can change a module's name in the Properties pane. It makes sense to give modules meaningful names.

    Modules are just containers for VBA code. You can use them to organize your code - place related macros in the same module, and unrelated macros in different modules. There are no hard and fast rules for this, it's a matter of personal taste and convenience. As far as executing a macro is concerned, it doesn't matter whether it is stored in Module1, Module37 or basToolbarMacros.

    Have you checked the Tools | Macro | Security dialog (from Outlook itself)?

  7. #7
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,370
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Macro Names (MSO 2003)

    Hans:

    I'm sorry... I checked Security, all was OK there, but then when I exited and then re-started Outlook and tried to execute the macros, the Message Box about trusted macros came up, allowing me to check the "always trust from this publisher box, so all is well again...

    Sorry for the bother, and thanks for all the help.

    So I can cut and paste my macros to any modules I may create (for organization) and the trusted status etc. will follow them? It'd be nice if there were a set of rules or procedures you could save off, and then execute all at once to activate this process. What the heck do you do in a network environment? If each person has their own macros, do you have to go through this process at each station?

    Regards,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Macro Names (MSO 2003)

    Sorry, Chuck, your threads in the VBA Forum (Search for CWBillow in VB/VBA) led me to expect you would understand. Meanwhile, Hans has answered your questions.
    -John ... I float in liquid gardens
    UTC -7ąDS

  9. #9
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Macro Names (MSO 2003)

    > So I can cut and paste my macros to any modules I may create (for organization) and the trusted status etc. will follow them?

    No, trusted status must be set by the current user, meaning, the logged in person. If you or anyone else could pre-mark code as "trusted," the entire security apparatus of MS Office would collapse.

    What you can do to better blend into the MS Office security model is purchase or otherwise arrange for a digital certificate that lets you sign your code in an official-looking manner (as you see when installing Microsoft add-ins or ActiveX controls). But that's probably more cost and hassle than you need; just tell your co-workers or whoever that they should trust your code. <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

  10. #10
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,370
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Macro Names (MSO 2003)

    Jefferson:

    I'm my own problem here...

    I do so much tinkering (re-installing etc.) that this macro issue is me causing me problems...

    If the only part of this was the message box popping up asking whether to trust, that would be no problem. But there's actually (it seems) about steps in creating the personal signature, authorizing it, re-signing the macros, and then assigning trust.

    There should be, *especially* for private / home users, to just set it so that all macros are safe... I had even tried adjusting security to the lowest level, and that doesn't bypass this issue either.

    A warning light you can never turn off....

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  11. #11
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Macro Names (MSO 2003)

    Chuck, I don't know exactly why this is happening to you - I don't have problems with macro security settings and self certification of macros. I think you need to learn to tinker within the framework Microsoft provides, by exporting your macros to text files using the VBE capabilities discussed at length in <!post=this thread,493431>this thread<!/post> and reimporting them via copy-&-paste from those text sources, rather than moving your OTM files around and so forth. If your work outside the system, the system isn't going to work with you.
    -John ... I float in liquid gardens
    UTC -7ąDS

  12. #12
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,370
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Macro Names (MSO 2003)

    John:

    O-k-a-y.... Sigh...

    I think I often find myself flailing against the winds when I want to do something...

    Maybe this one was just a bit bigger, 'cause I often find myself with little pieces of info for this or that, and sometimes not remembering how I did manage to solve it when it comes up again...

    It just has seemed to me, and often still does, that the people at MSapproach development the very way I do problem solving: in a patchwork process...

    It doesn't seem to be the best way for either of us...

    I think too, that often the "books" give you a way to do something, and if you happens to fall across another way, like I did with the copying vbaproject.otm, there's never any really clear "No, don't do that, and HERE'S why" to look at....

    It would really be nice if there were a "total resource" for quarrelsome sorts like me... Then we'd have to bother the boards less with questions research could (maybe) resolve.

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  13. #13
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Macro Names (MSO 2003)

    I didn't realize that your problem was caused by replacing the blank VbaProject.OTM with one from a backup. I'm surprised that didn't work. I copied mine from one PC with Outlook 2000 to a new PC with 2002, and then installed Outlook 2003 over 2002 and it picked it right up in each case. Probably I wasn't following the safest approach (!!), but I consider it pretty reliable. Sorry to hear it didn't work for you, and I have no idea why, unless it is something to do with file format changes in Outlook 2003.

  14. #14
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,370
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Macro Names (MSO 2003)

    Jefferson:

    I gotta find a way to take better notes...

    >>unless it is something to do with file format changes in Outlook 2003<<

    I don't think, because the first time I had macro issues like this was in 2K exclusively...

    I copy all my files from one drive to another whenever I'm re-installing etc., that way I can "pick and choose", where that's a bit more difficult from an image.

    The VbaProject.otm file is one of these...

    In 2000, the macros all had to be re-certified as safe. Signature creation, signing the project, etc. It MAY be just the same in 2003, but it seems to be not quite the case... Unless as stated in prior msgs., I just get ahead of myself and should be more careful... Possible.

    But in fact this is a perfect example of something that needs "steps" spelled out.

    "If you are going to re-install Office 2003, and you want to restore or bring back a prior copy of your macro project file, HERE'S what your're going to have to do:

    Step 1 -
    Step 2 -
    .....

    I guess it's a TRUE "Office for Dummies"...

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  15. #15
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Macro Names (MSO 2003)

    Some postscript thoughts:

    If you are reinstalling only Office programs, in my limited experience the OTM file isn't overwritten.
    If you are reinstalling the Windows OS, the digital signatures are probably wiped clean, though I can't find unequivocal proof, and I expect that the OTM file would be removed.
    Download & read this Microsoft Office XP Security White Paper, and see if it helps you with reimporting your digital signatures.
    -John ... I float in liquid gardens
    UTC -7ąDS

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •