Macro For Saving Worksheet to Word Document with A1 as filename

G

ghillman89

I am needing a macro to save an individual worksheet and transfer it t
a word document and save that document with the data listed in cell A1.
Any help would be greatly appreciated
 
A

Auric__

ghillman89 said:
I am needing a macro to save an individual worksheet and transfer it to
a word document and save that document with the data listed in cell A1.
Any help would be greatly appreciated.

Can you be more specific? What does the spreadsheet look like, and what do
you want the Word doc to look like?
 
H

Harold Druss

ghillman89 said:
I am needing a macro to save an individual worksheet and transfer it to
a word document and save that document with the data listed in cell A1.
Any help would be greatly appreciated.

This should get you started.
Make sure you set a reference to the Word object library!

====================================================
Sub CreateNewWordDoc()
' set a reference to the Word object library
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Add ' create a new document
wrdDoc.Range.Text = Range("a1").Formula
wrdApp.Quit ' close the Word application
Set wrdDoc = Nothing
Set wrdApp = 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

Top