Saving document creates folder containing images

M

Mark Bruso

I have a Word template that includes some graphics. I am using MS Access VBA
code to open a document based on the template, insert data, and then save
the file with File Name based on other data.

The code to save it is:
objWord.ActiveDocument.SaveAs ("NoHeatLetter_" & strJobNumber & ".doc")

The letter gets saved but with new folder containing graphic images that are
used in the document. For every letter saved, another folder is created,
causing a lot clutter excess files. I have attached the template to this
message.

Is there a way to save this letter without also creating the accompanying
folder?
 
G

Graham Mayor

It sounds as though the macro is saving as html, for reasons that are not
entirely clear - try adding the required fileformat to the SaveAs string.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Mark Bruso

Thanks! That did the trick. Should I have known of a simplier way to
determine if a file was saved in a html format?

Mark
 
G

Graham Mayor

I am not sure what you mean - by default Word should save in Word Doc
format. Why yours didn't must have some relevance to the rest of your code
and/or the nature of the document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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