Win32::OLE: problem setting hyperlinks in Excel spreadsheet

2009-03-31 Thread Mark Wood-Patrick
Mark Wood-Patrick wrote:
 I have some code which needs to set hyperlinks in an Excel document 
 and I want the text displayed to be different from the actual link 
 address.

 The following code works just fine for me:

 $worksheet-Hyperlinks-Add({ Anchor= 
 $worksheet-Cells($row, $col),
Address   
 = http://bugs/$bugID http://nvbugs/$bugID,
   });

$worksheet-Cells($row, $col)-{Value} = $bugID;

 But if I do:

 $worksheet-Hyperlinks-Add({ Anchor= $worksheet-Cells($row, 
 $col),
 Address   = 
 http://nvbugs/$bugID;,

TextToDisplay = 
 $bugID,

});


 I get:

OLE Error Win32::OLE(0.1709) error 0x80070057: The parameter is 
 incorrect

in METHOD/PROPERTYGET Add 

 but it did do what I wanted (the link was added correctly)

 anyone know why I get the error message, or how to debug this

 Mark




___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Win32::OLE problem

2008-05-13 Thread Bullock, Howard A.
Using Win32::OLE to create an ADO object and then query Active Directory
using an LDAP query the last field returned contains the additional text
of ;Subtree; in the fields name.

My query string: 
LDAP://OU=Business_Functions,OU=Global
Groups,DC=xxx,DC=com;(objectCategory=group);distinguishedName, cn,
sAMAccountName; subtree;;

Once the data is returned, the enumeration of the field names using the
code below shows:

distinguishedName
cn
sAMAccountName; subtree;

my @Fields = $resObj-Fields;
foreach my $field (in @Fields){
   print $field-{Name} .\n;
}



Howard A. Bullock
Tyco Electronics
Computer Security
717-810-3584

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::OLE problem

2008-05-13 Thread Bullock, Howard A.
Removing the trailing semi-colon did the trick.


From: Howard Tanner [mailto:[EMAIL PROTECTED] 

It's been a while, so I looked it up. From MS:

LDAP://DC=Fabrikam,DC=com;(objectClass=*);AdsPath, cn;subTree

So remove the space before subTree and the semi-colon following it. If
that still doesn't work, your query might be case sensitive, so fix the
capitalization for subTree. 


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs