I
Iain McLaren
Hi,
I'm trying to write a little perl script to enter contacts into a Lotus
Notes address book using Win32::OLE. I am basing it on a VBA script that I
found:
<snip>
Set NotesDoc = NotesDB.CreateDocument
With NotesDoc
.ReplaceItemValue "Form", "Person"
.ReplaceItemValue "CompanyName", "Nuclear Plant"
.ReplaceItemValue "FirstName", "Homer"
.ReplaceItemValue "LastName", "Simpson"
.ReplaceItemValue "JobTitle", "Saftey Inspector"
.ComputeWithForm True, False
.Save True, False
End With
<snip>
I can't figure out how to convert the ReplaceItem statements to Perl syntax.
I thought it would be something like this:
<snip>
my $newdoc = $Database->CreateDocument;
$newdoc->ReplaceItemValue({FirstName => 'Marge', LastName => 'Simpson', Type
=> 'Person'});
$newdoc->Save;
<snip>
This runs without generating an error, but doesn't seem to do anything
either :-/
Could anyone point me in the right direction? Any help greatly
appreciated!!!
Thanks,
Iain
I'm trying to write a little perl script to enter contacts into a Lotus
Notes address book using Win32::OLE. I am basing it on a VBA script that I
found:
<snip>
Set NotesDoc = NotesDB.CreateDocument
With NotesDoc
.ReplaceItemValue "Form", "Person"
.ReplaceItemValue "CompanyName", "Nuclear Plant"
.ReplaceItemValue "FirstName", "Homer"
.ReplaceItemValue "LastName", "Simpson"
.ReplaceItemValue "JobTitle", "Saftey Inspector"
.ComputeWithForm True, False
.Save True, False
End With
<snip>
I can't figure out how to convert the ReplaceItem statements to Perl syntax.
I thought it would be something like this:
<snip>
my $newdoc = $Database->CreateDocument;
$newdoc->ReplaceItemValue({FirstName => 'Marge', LastName => 'Simpson', Type
=> 'Person'});
$newdoc->Save;
<snip>
This runs without generating an error, but doesn't seem to do anything
either :-/
Could anyone point me in the right direction? Any help greatly
appreciated!!!
Thanks,
Iain