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\D ocuments"
& LastName & FirstName & Date & ".doc" .
Thanks 4 5955
"bborden" <bb*******@gmai l.com> wrote in message
news:ea******** *************** ***@posting.goo gle.com... 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\D ocuments" & LastName & FirstName & Date & ".doc" .
Thanks
Hi
Something like:
objWordDoc.Save As "C:\MyProgram\D ocuments\" & 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
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 printed on its own page which
I've set up as a report and that's working fine.
Accompanying each job is a Word (or Excel) document. Most jobs will have
Word (or Excel) documents unique to the record. I know how to establish a
hyperlink field...
|
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 write a VB
script, to be executed either within Access or executed at the CMD
prompt, which will loop through all the records and open the document
object and save it to a Word document that I can access from Windows
Explorer. An additional info...
|
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 word-document to
make a decent report (transferring a report from access to word means a
lot of loss on lay out, which I find a clear showcase of microsoft's
socalled software quality).
|
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 document in Word;
2. opens the document and runs the merge process for the new data.
I have managed to write the code to perform step 1 ok, but I'm having
trouble with step 2. It opens the word document fine but does not perform
the mail merge of...
|
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 happen is as follows:
User defines a storage path and name for the new Word document then
clicks a "Create" button on a form. From that point on I use the
following code:
| |
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 as the name of
the child, their address, etc. At this time staff will look into the
database for that info and enter it into the form. Management wants to
automate this a bit so each of these templates is a report. That leads
to my question.
...
|
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 doc already stored in C:
drive):
Dim oX As Object
Set oX = CreateObject("C:\temp.doc")
oX.editreplace "<<FirstName>>", "Richard", 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0
oX.Application.Visible = True
Set oX = Nothing
|
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 from
Access are automatically filled into the Word document. The query
could be anywhere from 0-5000 names, one cover letter per name. AND to
this cover letter for each applicant, there has to be attached a two
page document. How in the world can...
|
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 know one way or the other whether that was
true or not, or could point me to an article or help text that would. What I
have seen so far online and in Access 2007 help seems to confirm the above.
But that (or at least (b)) seems incredible that it...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |