[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-beginners
Subject:    Re: How to set a COM Object property to TRUE
From:       "Jenda Krynicky" <Jenda () Krynicky ! cz>
Date:       2007-09-26 22:03:10
Message-ID: 46FAF33E.5023.1EDEDCB9 () Jenda ! Krynicky ! cz
[Download RAW message or body]

From: bmw108@gmail.com
> I am trying to set a WIN32 COM Object bool property true to enable a
> validation option.
> 
> I can do it in VB like so.
> 
> emailPtr.CorrectSyntax = True
> 
> How do I do it in PERL?
> 
> I have tried so many different things to no avail.
> 
> $emailObj->{MxLookup} = (TRUE);
> $emailObj->{MxLookup} = $TRUE;
> $emailObj->{MxLookup} = 1;
> $emailObj->{MxLookup} = TRUE;

Try
  $emailObj->{MxLookup} = -1; 
  # yes, CInt(True) == -1

or
  use Win32::OLE::Variant;
  $emailObj->{MxLookup} = Variant(VT_BOOL, -1);

HTH, Jenda
===== Jenda@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
	-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic