473,320 Members | 1,950 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,320 software developers and data experts.

Print a Word document that is linked to a Access database

1
Hello,

I have a Ms Access database, and linked some Ms Word documents to it,
so I can print the data in the database nicely into a letter.
In Word, I can search for a certain record of my database, and the data is visible in the correct fields in Word.

Is it possible to use Python to open such a document, search for a certain
recordnumber (in the database), and have the total document printed (standard-text and data)?

I already use python to connect to the database and add records with the win32com.client command.

Thanks!
Oct 2 '07 #1
1 2523
bartonc
6,596 Expert 4TB
Hello,

I have a Ms Access database, and linked some Ms Word documents to it,
so I can print the data in the database nicely into a letter.
In Word, I can search for a certain record of my database, and the data is visible in the correct fields in Word.

Is it possible to use Python to open such a document, search for a certain
recordnumber (in the database), and have the total document printed (standard-text and data)?

I already use python to connect to the database and add records with the win32com.client command.

Thanks!
Hello.
It is quite easy to automate MS Word using python. Just as in this thread where Excel cell values are read into python variables, you may automate Word if you can figure out the Visual Basic needed for the task. If you don't know VB, you can record a macro in MS Word that does the job and translate that into your python implementation.

As you will see in the aforementioned thread, the win32com.client package is used for this task, also.

I hope that's the info that you were looking for,
Barton
Oct 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

41
by: Ruby Tuesday | last post by:
Hi, I was wondering if expert can give me some lite to convert my word table into access database. Note: within each cell of my word table(s), some has multi-line data in it. In addition, there...
3
by: intl04 | last post by:
Is it possible to create a Word form as the data entry form for an Access database? I didn't see any reference to this possibility in my Access books, so I'm sorry if this is a question that is...
1
by: Bill Short | last post by:
I would like to print a report (or reports) from Access based on the Word document I have open. For instance, the Word doc I have open is called 10-789-65.doc. From Word, I would like to open...
2
by: Joe Black | last post by:
Hi My database is filling a Word docs with data using bookmarks. My client wants one particular document to print using the lower tray which will hav a special letterhead loaded in it. Is...
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...
1
by: ashkash | last post by:
I have an access database which takes information from a user and then uses the mail merge functionality to merge the data into a word document. I have a lot of subforms in the access database which...
1
by: mikeyatsony | last post by:
Hi all... Is there a web for my ASP Web application tied to a SQL Server Express DB to print labels? I need a way to have reports printed from the user's browser. They wish to print labels...
8
by: Ron B | last post by:
Help!!! What am I doing wrong? I am working with Office 2003 and am trying to create a command button on an Access form that will create a mail merge in Word from an Access table. I want to...
14
klarae99
by: klarae99 | last post by:
I am wondering if access 2003 has the ability to open a linked Word Document, without that document being related directly to a table (I do not need to merge data with the document). I am...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.