473,287 Members | 2,263 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Access to Word - Save Word document as

When I save a document in Word that I have transferred from VBA to
Word I notice that the "Save As" file name is for, instance, "December
4.doc". Since the date is the first field I print on the Word
document I guess it picks up this as a key.

How do I stipulate what the name of the document is to be once I want
to save it in Word?

" .SaveAs" actually saves the document and I want to view and edit the
document and manually save it.

It would be nice to have the document save as "C:\MyProgram\Documents"
& LastName & FirstName & Date & ".doc" .

Thanks
Nov 13 '05 #1
4 5889

"bborden" <bb*******@gmail.com> wrote in message
news:ea**************************@posting.google.c om...
When I save a document in Word that I have transferred from VBA to
Word I notice that the "Save As" file name is for, instance, "December
4.doc". Since the date is the first field I print on the Word
document I guess it picks up this as a key.

How do I stipulate what the name of the document is to be once I want
to save it in Word?

" .SaveAs" actually saves the document and I want to view and edit the
document and manually save it.

It would be nice to have the document save as "C:\MyProgram\Documents"
& LastName & FirstName & Date & ".doc" .

Thanks


Hi

Something like:
objWordDoc.SaveAs "C:\MyProgram\Documents\" & LastName & FirstName &
Format(Date, "d mmm yyyy") & ".doc"

Tip: use the macro recorder in Word to see how to carry out the actions you
are interested in.

Regards - Joe
Nov 13 '05 #2
Thanks Joe.

Nov 13 '05 #3
Thanks Joe.

Nov 13 '05 #4
The only problem in doing it your way is that the document will be
saved even if you elect not to save it. It actually saves a blank page.

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jeff Harbin | last post by:
I've got an ACCESS 2000 application that I'm developing. One of the outputs of this app will be to generate a series of 'jobs' which corresponds to a record in the database. Each record will be...
4
by: Otis Hunter | last post by:
I have been given an Access Database which contains a table that has an OLE object field that contains a Word document. That table contains hundreds of records. I would like to find out how I can...
4
by: svdh2 | last post by:
Dear All, I have lately strugled more and more with Access, what started as a simple database has brought me to the fundaments of Access. I need to transfer fields from various tables to a...
3
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge...
0
by: Linda Cacina | last post by:
Hello all you fine folks, Here is some code I am using to merge data from a single record Access 2K3 table into a NEW word document based on a pre-defined Word merge template doc. All I want to...
5
by: rick m | last post by:
We have a fairly good sized Access database that contains some info on the children our agency sees. We also have 40+ templates that require some info from the database be inputted into them, such...
5
by: ruomingxu via AccessMonster.com | last post by:
I am new in this area. I want to use values in a Access database and pass them to a word document. I tried this test code in a form of the Access database but it didn't work (temp.doc is a word...
8
by: babyangel43 | last post by:
Hello, I have a query set up in Access. I run it monthly, changing "date of test". I would like this query to be merged with a Word document so that the cover letter is created in Word, the fields...
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.