Re: copy email to a task in vba



Am Thu, 2 Mar 2006 11:39:31 -0800 schrieb BillyRogers:

Sue told you the easiest way. If that looks too strange for you then you
could also declare it in the Formular as a public member. Example:

<Form1>
Public MailItem as Outlook.MailItem
</Form1>

<ThisOutlookSession>
Private Sub myOlItems_ItemAdd(ByVal item As Object)
Dim fm as Form1
...
Set fm=new Form1
Set fm.MailItem = Item
fm.Show
End Sub
</ThisOutlookSession>

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


I just figured it out.

You have to declare the variable in a standard module as public to pass
it
between a form and "ThisOutlookSession"

Seems kind of strangr to have to declare it in a module that doesn't even
use it so I can pass it between two other modules.
.



Relevant Pages

  • Re: "my" variables and recursive regexp strangeness
    ... > I have something strange happening with a recursive regexp compiled ... > It works fine when the sub parts of it are global variables, ... to declare the variables in the same statement that uses them, ...
    (comp.lang.perl.misc)
  • DBD::Sybase with MS SQL insert problem
    ... so I'm stuck with the kluge described ... I'm seeing a strange result after executing the following query: ... DECLARE \@siteurl sc_url ...
    (perl.dbi.users)
  • Re: PInvoke question (caling conventions of C DLLs)
    ... "Anonymous" schrieb ... is the Python DLL. ... I have noticed something strange. ... When I declare the functions in ...
    (microsoft.public.dotnet.languages.vb)
  • Re: PInvoke question (caling conventions of C DLLs)
    ... the Python DLL. ... I have noticed something strange. ... When I declare the functions in VB6 ...
    (microsoft.public.dotnet.languages.vb)
  • Re: global variables
    ... Public PairID As Integer ... Dim NumberOfPairs As Integer ... declare those at the form level to restrict scope to each Form. ... Form1 will see that change too. ...
    (comp.lang.basic.visual.misc)