Printing a Word document from an excel macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Excel spreadsheet that I use to link information to Word documents.
I have created a hyperlink which opens the Word Document and updates the
links, but I was wondering if a macro could be written that would:
1. Open the Doc
2. Update the Links
3. Print the document
4. Save the document
5. Close the document
I would then be able to create a control button that would allow the users
to click on one button to complete the process.
 
Hi Mike

Try something like this

Sub test()
Dim WD As Object
Set WD = CreateObject("Word.Application")
WD.Documents.Open ("C:\ron.doc")
WD.ActiveDocument.PrintOut Background:=False
WD.ActiveDocument.Close
WD.Quit
Set WD = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top