[AccessD] A2003: Excel Question - Exporting Values as hyperlinks

Paul Hartland paul.hartland at googlemail.com
Wed Jul 3 01:34:22 CDT 2013


Used to manipulate Excel from VB6 (really must learn .net soon) at my old
company, I used to do the bit posted by Darryl "You can open XL, create the
workbook, copy the recordset and then loop thru the list all from Access
VBA." then if I knew the column position you can just change that single
column without the looping, I doubt I have got the code (as was for a
company I was employed by) but will have a look, if not and I get time I
will try to do a quick example for you (mind you I am sure someone on the
list has something somewhere).

Paul


On 3 July 2013 07:08, Darryl Collins <darryl at whittleconsulting.com.au>wrote:

> Hi Darren,
>
> Heading home shortly so I have to be fast.
>
> You can do it, but you would have to add it after you do the transfer
> (assuming you use that method).
>
> See : http://msdn.microsoft.com/en-us/library/office/ff822490.aspx
>
> For details.
>
> In short you would use code to loop thru the column and set the range
> value as the hyperlink address.
>
> That should do the trick for you.
>
> You could control this from access by setting your XL target as an object
> in Access VBA.
>
> If you need help with that from me, it is going to have to wait until
> tomorrow.
>
> You can open XL, create the workbook, copy the recordset and then loop
> thru the list all from Access VBA.
>
> Cheers
> Darryl.
>
>
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:
> accessd-bounces at databaseadvisors.com] On Behalf Of Darren
> Sent: Wednesday, 3 July 2013 3:07 PM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] A2003: Excel Question - Exporting Values as hyperlinks
>
> Hi Ya'll (Darryl et al)
>
> How do I output a recordset to excel and have the resulting excel doc
> treat one of the field's values (literal paths to docs) as a hyperlink?
>
> I have no knowledge or real experience with Excel automation apart from
> the "docmd.TransferSpreadsheet" command.
>
> I have values like "T:\SomeFolder\SomeNumberedFolder\somePDFFile.pdf"
> stored in a field.
>
> I can export these to Excel using xfer spreadsheet but how do I make the
> value's 'clickable' in the resulting XL doc?
>
> I want users to click or double click the hyperlink field value and open
> the associated doc as per the stored path.
>
> Make sense?
>
>
>
> Many thanks in advance
>
> DD
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



-- 
Paul Hartland
paul.hartland at googlemail.com


More information about the AccessD mailing list