Using Output To Macro and wants to automatically "Save As"

  • Thread starter bassstuf via AccessMonster.com
  • Start date
B

bassstuf via AccessMonster.com

When using the "Output To" Macro in HTML format, it produces a seperate file
for each page of the report, this is great! What I want to do is have them
saved as with the serial number of the unit?

For example, it saves it automatically as "CP.html" then "CPpage2.html". When
I would rather have it saved as "CP 99999.html".

Is this possible?
 
B

bhicks11 via AccessMonster.com

Serial number of what unit? Can you gather the number from a variable? If
so you can use the variable to name the file.

In VBA

Dim mvar as string

mvar = whatever

DoCmd.OutputTo acOutputQuery, "WhateverQuery", acFormatHTML, mvar

Bonnie
http://www.dataplus-svc.com
 
B

bassstuf via AccessMonster.com

Bonnie

Thanks for your help, but I am still having problems with this (I am new to
all of this)

I went to put what you wrote into a module and changed the whatever to the
name of the column "saveas", but got a complile error. this what I have

Dim mvar As String

mvar = Whatever

DoCmd.OutputTo acOutputQuery, "[CP]![Whatever]", acFormatHTML, mvar

Thanks
DB
Serial number of what unit? Can you gather the number from a variable? If
so you can use the variable to name the file.

In VBA

Dim mvar as string

mvar = whatever

DoCmd.OutputTo acOutputQuery, "WhateverQuery", acFormatHTML, mvar

Bonnie
http://www.dataplus-svc.com
When using the "Output To" Macro in HTML format, it produces a seperate file
for each page of the report, this is great! What I want to do is have them
[quoted text clipped - 4 lines]
Is this possible?
 
B

bassstuf via AccessMonster.com

Bonnie

Thanks for your help, but I am still having problems with this (I am new to
all of this)

I went to put what you wrote into a module and changed the whatever to the
name of the column "saveas", but got a complile error. this what I have

Dim mvar As String

mvar = Saveas

DoCmd.OutputTo acOutputQuery, "[CP]![saveas]", acFormatHTML, mvar

Thanks
DB
Serial number of what unit? Can you gather the number from a variable? If
so you can use the variable to name the file.

In VBA

Dim mvar as string

mvar = whatever

DoCmd.OutputTo acOutputQuery, "WhateverQuery", acFormatHTML, mvar

Bonnie
http://www.dataplus-svc.com
When using the "Output To" Macro in HTML format, it produces a seperate file
for each page of the report, this is great! What I want to do is have them
[quoted text clipped - 4 lines]
Is this possible?
 
B

bhicks11 via AccessMonster.com

Here's the format:

DoCmd.OutputTo ObjectType (I put query), ObjectName (your query name), Output
To Name (this is the mvar - you assign it in your code)

Bonnie
http://www.dataplus-svc.com
Bonnie

Thanks for your help, but I am still having problems with this (I am new to
all of this)

I went to put what you wrote into a module and changed the whatever to the
name of the column "saveas", but got a complile error. this what I have

Dim mvar As String

mvar = Saveas

DoCmd.OutputTo acOutputQuery, "[CP]![saveas]", acFormatHTML, mvar

Thanks
DB
Serial number of what unit? Can you gather the number from a variable? If
so you can use the variable to name the file.
[quoted text clipped - 15 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top