Max Wanadoo
max.wanadoo at gmail.com
Fri Jun 6 09:13:39 CDT 2008
Thanks MF The s/sheet was being opened by another person who would not be running any code. However, it seems to have resolved itself. Thanks Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of MF Sent: Friday, June 06, 2008 1:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access To Excel via a CSV File [vba] ActiveWindow.WindowState = xlMaximized [/vba] MF ______________________________ At 09:34 AM 06/06/2008, you wrote: >Well, >Thanks to all those who responded. >I have had quite some success, but not fully. >Thanks to Jennifer's and Rocky's examples and all the other tips I was >able to create the xls exactly as I wanted. This is great. >I am able to give it a filename and save it to disk. From there I can >email it out. >All this from the click of a button without the user seeing or doing >anything - Brilliant! > >However, the one small glitch I have is that when it is subsequently >opened up, the worksheet "floats" within the Excel App. It has its own >title bar which can be grabbed and moved around. Any ideas? > >Max > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil >Salakhetdinov >Sent: Thursday, June 05, 2008 7:21 PM >To: 'Access Developers discussion and problem solving' >Subject: Re: [AccessD] Access To Excel via a CSV File > >Hello Max, > >If your output .csv will have predefined format then the following >tricks could work: > >- prepare formatted .xls template worksheet (let's call it >myTemplate.xls); >- generate/export .csv from MS Access and assign to the output filename >an .xls extension (let's call it my.csv.xls); >- open generated my.csv.xls in XL using Automation (and all the >following actions will be performed using Automation also); >- open myTemplate.xls in XL; >- select all cells of myTemplate.xls's template worksheet; >- execute copy of selected range to clipboard; >- switch to previously opened my.csn.xls; >- select all its cells and use Paste Special->Formats... >... > >That could be it... > >-- >Shamil > > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo >Sent: Thursday, June 05, 2008 6:34 PM >To: 'Access Developers discussion and problem solving' >Subject: [AccessD] Access To Excel via a CSV File > > >Can any of you Access/Excel gurus help here please. >I need to create a csv spreadsheet by code. When it is complete, I >need to put formatting on it. Ie,make columns into Currency Types. Bold >some Rows, set some bacground colours, etc. >I have got as far as creating the CSV ok but then I am stumped. >Any advice most welcome. >Ta >Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com