ExportWithFormatting without formating (1 Viewer)

Ports

Registered User.
Local time
Yesterday, 18:13
Joined
Jun 30, 2019
Messages
64
Hi,


I've created a set of queries that I'd need to export every month. I've started looking at macros and have found that I could export a query using a series of ExportWithFormatting actions



A couple of questions:
- Is it possible to export it without formatting? I can't see an equivalent action?
- Is it possible to specify the directory for the files to be exported to?


Thank you
 

CJ_London

Super Moderator
Staff member
Local time
Today, 02:13
Joined
Feb 19, 2013
Messages
16,610
I don't use macros due to their limitations. You haven't said what type of file you are creating but in VBA you can use transfertext or transferspreadsheet. There may be an equivalent macro.

to answer your questions, you can't export with formatting with either of these methods and you do have to specify directory and file name

here are a couple of links
https://docs.microsoft.com/en-us/office/vba/api/access.docmd.transferspreadsheet
https://docs.microsoft.com/en-us/office/vba/api/access.docmd.transfertext
 

Ports

Registered User.
Local time
Yesterday, 18:13
Joined
Jun 30, 2019
Messages
64
I don't use macros due to their limitations. You haven't said what type of file you are creating but in VBA you can use transfertext or transferspreadsheet. There may be an equivalent macro.

to answer your questions, you can't export with formatting with either of these methods and you do have to specify directory and file name

here are a couple of links
https://docs.microsoft.com/en-us/office/vba/api/access.docmd.transferspreadsheet
https://docs.microsoft.com/en-us/office/vba/api/access.docmd.transfertext


Thanks. I'm exporting to .xlsx - I assume you meant I CAN export without formatting, didn't you?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 02:13
Joined
Feb 19, 2013
Messages
16,610
I'm saying these methods do not have the ability to export with formatting - so you are not given the option of exporting with formatting.
 

Ports

Registered User.
Local time
Yesterday, 18:13
Joined
Jun 30, 2019
Messages
64
I'm saying these methods do not have the ability to export with formatting - so you are not given the option of exporting with formatting.


Which is what I want (ie. export withOUT formatting) - so it's good. The macro action does it WITH formatting, wich I didn't need.


Just looking at the links that you suggested.
 

Users who are viewing this thread

Top Bottom