Link to home
Start Free TrialLog in
Avatar of Rawdon Hume
Rawdon HumeFlag for United Kingdom of Great Britain and Northern Ireland

asked on

export records to word from access issue

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
Avatar of GRayL
GRayL
Flag of Canada image

Any more details?
Avatar of Rawdon Hume

ASKER

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?
Have you tried saving the recordset you are exporting as a rtf file, and then open the file using Word?
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 ?
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
SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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 ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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)
ahh ... really, thank you ... but I wasn't looking for pts here ... I was serious about gRay gets this one ... :-

mx
opps...my bad sorry
Notice how when serious happens, the smile goes;-)

gRay gets this one ... :-) - versus - gRay gets this one ... :-
opps sorry if iv offended any one in any way =0/