?
Solved

export records to word from access issue

Posted on 2007-07-25
15
Medium Priority
?
296 Views
Last Modified: 2013-11-27
hey,

I am exporting records to word using bookmarks but i need to select the printer word should use when printing, any ideas how i might achieve this, i dont want to use a mail merge function much rather keep it simple
0
Comment
Question by:Rawdon Hume
  • 8
  • 4
  • 2
  • +1
15 Comments
 
LVL 44

Expert Comment

by:GRayL
ID: 19569360
Any more details?
0
 
LVL 2

Author Comment

by:Rawdon Hume
ID: 19569673
ummm...well the printer is on a network, i have its ip address and name, i can post the code i have so far but its quite long, what more do you need to know =) ?

The user who im making a access program for, wants to in access select from a list of printers the printer word should use when printing, the code sends all the record information from access via bookmarks into word, prints the document and closes it, as the user wants the freedome to edit the word document I dont want to use mail merge as user wont know how to edit the code, any ideas?
0
 
LVL 44

Expert Comment

by:GRayL
ID: 19569751
Have you tried saving the recordset you are exporting as a rtf file, and then open the file using Word?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Author Comment

by:Rawdon Hume
ID: 19570055
Ideally it needs to be all automated, I have seen vba code that dose it in other programs but don think it works in access

appword.ActivePrinter = LabelPrinter
    appword.DefaultPrintBarCode = False
    ActiveDocument.ActivePrinter = DefaultPrinter

Any ideas ?
0
 
LVL 2

Author Comment

by:Rawdon Hume
ID: 19570216
Could i have a macro or vba code in word to select the printer that access can then run or call and pass data to ?  could perhaps show the user how to copy the code to a new word document. But ideally I would rather do it with access
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 664 total points
ID: 19570901
gRay gets this one ... :-)

mx
0
 
LVL 34

Accepted Solution

by:
jefftwilley earned 668 total points
ID: 19570939
0
 
LVL 2

Author Comment

by:Rawdon Hume
ID: 19574764
I found this:

http://www.tek-tips.com/faqs.cfm?fid=5479
 
but then in vista i did this :

 objWord.Application.ActivePrinter = "Dell Color Printer 725"
 objWord.Application.ActiveDocument.ActivePrinter = "Dell Color Printer 725"
 objWord.ActivePrinter = "Dell Color Printer 725"

and seams to work ? will test in xp now
0
 
LVL 2

Author Comment

by:Rawdon Hume
ID: 19575309
WOW seams to work in xp too, didnt realise how easy it was, seamed to be really hard from everything i had been able to find on this subject, am i missing something as it cant be that easy...can it ?
0
 
LVL 44

Assisted Solution

by:GRayL
GRayL earned 668 total points
ID: 19575578
As Albert Kallal (author of code) implied in his preamble, we are good at making mountains out of molehills
0
 
LVL 2

Author Comment

by:Rawdon Hume
ID: 19575953
lol nps appreciate the help =0) I hope any time any one else need to do something similar they wont have to spend hours searching and find this helpful ;0)
0
 
LVL 75
ID: 19575971
ahh ... really, thank you ... but I wasn't looking for pts here ... I was serious about gRay gets this one ... :-

mx
0
 
LVL 2

Author Comment

by:Rawdon Hume
ID: 19575991
opps...my bad sorry
0
 
LVL 44

Expert Comment

by:GRayL
ID: 19576003
Notice how when serious happens, the smile goes;-)

gRay gets this one ... :-) - versus - gRay gets this one ... :-
0
 
LVL 2

Author Comment

by:Rawdon Hume
ID: 19578901
opps sorry if iv offended any one in any way =0/
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question