Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 46
Default export information from excel to word doc template

I have an excel doc/table A3-M3 downwards.

in N3 etc, I would like a button that, when pressed, will open a word.doc
template and export data in A3 into a particulr section in that document.
It will also take info from B3 to another part, B4 to another etc etc.

Is this possible?

Thank you in anticipation.

Kind regards

Aaron

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default export information from excel to word doc template

Word Mail Merge with Excel table as source (it works opposite you asked - in
word you open a MM template, determine filter conditions, and document(s)
based on data in source table is/are generated/printed/mailed (you can
select different outputs there).

But you must have all info for document in single row of excel table. And
the table MUST have a single header row. And am best keep things with table
as as possible - keep the source table as first in workbook, and start the
table a top of sheet (headers start from A1).


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Aaron Hodson (Coversure)" wrote in message
...
I have an excel doc/table A3-M3 downwards.

in N3 etc, I would like a button that, when pressed, will open a word.doc
template and export data in A3 into a particulr section in that document.
It will also take info from B3 to another part, B4 to another etc etc.

Is this possible?

Thank you in anticipation.

Kind regards

Aaron



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 46
Default export information from excel to word doc template

Thanks Arvi,

I was hoping it would be possible to export rather than import,

At present I am inputting information into excel as a of log of information,
once completed, I then open my MSWord template and have to retype all
information.

My excel spreadsheet is normally about 90 rows long per month and I thought
that it may have been possible to click a button to export the info from
that particular row into a word document.

Though I appreciate the prompt reply, it wouldn't be helpful to mail merge
from word.

Thanks

Aaron


"Arvi Laanemets" wrote in message
...
Word Mail Merge with Excel table as source (it works opposite you asked -
in word you open a MM template, determine filter conditions, and
document(s) based on data in source table is/are generated/printed/mailed
(you can select different outputs there).

But you must have all info for document in single row of excel table. And
the table MUST have a single header row. And am best keep things with
table as as possible - keep the source table as first in workbook, and
start the table a top of sheet (headers start from A1).


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Aaron Hodson (Coversure)" wrote in message
...
I have an excel doc/table A3-M3 downwards.

in N3 etc, I would like a button that, when pressed, will open a word.doc
template and export data in A3 into a particulr section in that document.
It will also take info from B3 to another part, B4 to another etc etc.

Is this possible?

Thank you in anticipation.

Kind regards

Aaron




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default export information from excel to word doc template

And why isn't MM helpful then?

You type information into excel, and close the file;
You open Word, and open our MM template (it isn't your document template,
probably you have to create it jet, to link your excel table with it, and
save it);
You start MM with template open, and determine which rows from your table
are processed;
You determine output media;
You process MM - document or documents are created or printed or set as
e-mails.

Next time you enter new info into excel table, save it or close the file,
open MM template you created earlier, determine which rows to process this
time, and create new outputs, etc.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Aaron Hodson (Coversure)" wrote in message
...
Thanks Arvi,

I was hoping it would be possible to export rather than import,

At present I am inputting information into excel as a of log of
information, once completed, I then open my MSWord template and have to
retype all information.

My excel spreadsheet is normally about 90 rows long per month and I
thought that it may have been possible to click a button to export the
info from that particular row into a word document.

Though I appreciate the prompt reply, it wouldn't be helpful to mail merge
from word.

Thanks

Aaron


"Arvi Laanemets" wrote in message
...
Word Mail Merge with Excel table as source (it works opposite you asked -
in word you open a MM template, determine filter conditions, and
document(s) based on data in source table is/are generated/printed/mailed
(you can select different outputs there).

But you must have all info for document in single row of excel table. And
the table MUST have a single header row. And am best keep things with
table as as possible - keep the source table as first in workbook, and
start the table a top of sheet (headers start from A1).


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Aaron Hodson (Coversure)" wrote in message
...
I have an excel doc/table A3-M3 downwards.

in N3 etc, I would like a button that, when pressed, will open a
word.doc template and export data in A3 into a particulr section in that
document. It will also take info from B3 to another part, B4 to another
etc etc.

Is this possible?

Thank you in anticipation.

Kind regards

Aaron






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default export information from excel to word doc template

It is not only possible, it is quite easy too. Check out these resources:

http://word.mvps.org/faqs/interdev/C...XLFromWord.htm

http://word.mvps.org/FAQs/InterDev/C...WordFromXL.htm


This is what I use personally:
http://word.mvps.org/FAQs/InterDev/F...xFromXLDAO.htm

If you use this technique, you will have to create a UserForm (called
'UserForm1') and a ListBox (called 'ListBox1') and a CommandButton (called
'CommandButton1').

When you double-click on the CommandButton, you need to have code such as:
Private Sub CommandButton1_Click()
ListBox1.BoundColumn = 1
ActiveDocument.Variables("Tracking_Number").Value = ListBox1.Value
ListBox1.BoundColumn = 2
ActiveDocument.Variables("First_Name").Value = ListBox1.Value
ListBox1.BoundColumn = 3
ActiveDocument.Variables("Last_Name").Value = ListBox1.Value
ActiveDocument.Fields.Update
UserForm1.Hide
End Sub

Also, you need to have code such as:
Private Sub UserForm_Initialize()

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim NoOfRecords As Long

' Open the database
Set db = OpenDatabase("C:\Test\Book1.xls", False, False, "Excel 8.0")

' Retrieve the recordset
Set rs = db.OpenRecordset("SELECT * FROM `myDatabase`")

' Determine the number of retrieved records
With rs
.MoveLast
NoOfRecords = .RecordCount
.MoveFirst
End With

' Set the number of Columns = number of Fields in recordset
ListBox1.ColumnCount = rs.Fields.Count

' Load the ListBox with the retrieved records
ListBox1.Column = rs.GetRows(NoOfRecords)

' Cleanup
rs.Close
db.Close

Set rs = Nothing
Set db = Nothing

End Sub

Finally, in your Word document, or Word Template, you need to go to: Insert
Field DocumentVariable...then name the variable...such as

Tracking_Number, or First_Name, or Last_Name...

Hope that helps!

Regards,
Ryan--

--
RyGuy


"Arvi Laanemets" wrote:

And why isn't MM helpful then?

You type information into excel, and close the file;
You open Word, and open our MM template (it isn't your document template,
probably you have to create it jet, to link your excel table with it, and
save it);
You start MM with template open, and determine which rows from your table
are processed;
You determine output media;
You process MM - document or documents are created or printed or set as
e-mails.

Next time you enter new info into excel table, save it or close the file,
open MM template you created earlier, determine which rows to process this
time, and create new outputs, etc.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Aaron Hodson (Coversure)" wrote in message
...
Thanks Arvi,

I was hoping it would be possible to export rather than import,

At present I am inputting information into excel as a of log of
information, once completed, I then open my MSWord template and have to
retype all information.

My excel spreadsheet is normally about 90 rows long per month and I
thought that it may have been possible to click a button to export the
info from that particular row into a word document.

Though I appreciate the prompt reply, it wouldn't be helpful to mail merge
from word.

Thanks

Aaron


"Arvi Laanemets" wrote in message
...
Word Mail Merge with Excel table as source (it works opposite you asked -
in word you open a MM template, determine filter conditions, and
document(s) based on data in source table is/are generated/printed/mailed
(you can select different outputs there).

But you must have all info for document in single row of excel table. And
the table MUST have a single header row. And am best keep things with
table as as possible - keep the source table as first in workbook, and
start the table a top of sheet (headers start from A1).


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Aaron Hodson (Coversure)" wrote in message
...
I have an excel doc/table A3-M3 downwards.

in N3 etc, I would like a button that, when pressed, will open a
word.doc template and export data in A3 into a particulr section in that
document. It will also take info from B3 to another part, B4 to another
etc etc.

Is this possible?

Thank you in anticipation.

Kind regards

Aaron








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 46
Default export information from excel to word doc template

Thank you very much,

Will work on this over the next few days.

Thanks again for the replies,

Aaron

"ryguy7272" wrote in message
...
It is not only possible, it is quite easy too. Check out these resources:

http://word.mvps.org/faqs/interdev/C...XLFromWord.htm

http://word.mvps.org/FAQs/InterDev/C...WordFromXL.htm


This is what I use personally:
http://word.mvps.org/FAQs/InterDev/F...xFromXLDAO.htm

If you use this technique, you will have to create a UserForm (called
'UserForm1') and a ListBox (called 'ListBox1') and a CommandButton (called
'CommandButton1').

When you double-click on the CommandButton, you need to have code such as:
Private Sub CommandButton1_Click()
ListBox1.BoundColumn = 1
ActiveDocument.Variables("Tracking_Number").Value = ListBox1.Value
ListBox1.BoundColumn = 2
ActiveDocument.Variables("First_Name").Value = ListBox1.Value
ListBox1.BoundColumn = 3
ActiveDocument.Variables("Last_Name").Value = ListBox1.Value
ActiveDocument.Fields.Update
UserForm1.Hide
End Sub

Also, you need to have code such as:
Private Sub UserForm_Initialize()

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim NoOfRecords As Long

' Open the database
Set db = OpenDatabase("C:\Test\Book1.xls", False, False, "Excel 8.0")

' Retrieve the recordset
Set rs = db.OpenRecordset("SELECT * FROM `myDatabase`")

' Determine the number of retrieved records
With rs
.MoveLast
NoOfRecords = .RecordCount
.MoveFirst
End With

' Set the number of Columns = number of Fields in recordset
ListBox1.ColumnCount = rs.Fields.Count

' Load the ListBox with the retrieved records
ListBox1.Column = rs.GetRows(NoOfRecords)

' Cleanup
rs.Close
db.Close

Set rs = Nothing
Set db = Nothing

End Sub

Finally, in your Word document, or Word Template, you need to go to:
Insert
Field DocumentVariable...then name the variable...such as

Tracking_Number, or First_Name, or Last_Name...

Hope that helps!

Regards,
Ryan--

--
RyGuy


"Arvi Laanemets" wrote:

And why isn't MM helpful then?

You type information into excel, and close the file;
You open Word, and open our MM template (it isn't your document template,
probably you have to create it jet, to link your excel table with it, and
save it);
You start MM with template open, and determine which rows from your table
are processed;
You determine output media;
You process MM - document or documents are created or printed or set as
e-mails.

Next time you enter new info into excel table, save it or close the file,
open MM template you created earlier, determine which rows to process
this
time, and create new outputs, etc.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Aaron Hodson (Coversure)" wrote in message
...
Thanks Arvi,

I was hoping it would be possible to export rather than import,

At present I am inputting information into excel as a of log of
information, once completed, I then open my MSWord template and have to
retype all information.

My excel spreadsheet is normally about 90 rows long per month and I
thought that it may have been possible to click a button to export the
info from that particular row into a word document.

Though I appreciate the prompt reply, it wouldn't be helpful to mail
merge
from word.

Thanks

Aaron


"Arvi Laanemets" wrote in message
...
Word Mail Merge with Excel table as source (it works opposite you
asked -
in word you open a MM template, determine filter conditions, and
document(s) based on data in source table is/are
generated/printed/mailed
(you can select different outputs there).

But you must have all info for document in single row of excel table.
And
the table MUST have a single header row. And am best keep things with
table as as possible - keep the source table as first in workbook, and
start the table a top of sheet (headers start from A1).


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Aaron Hodson (Coversure)" wrote in message
...
I have an excel doc/table A3-M3 downwards.

in N3 etc, I would like a button that, when pressed, will open a
word.doc template and export data in A3 into a particulr section in
that
document. It will also take info from B3 to another part, B4 to
another
etc etc.

Is this possible?

Thank you in anticipation.

Kind regards

Aaron







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export from Excel to Word Kaz G Charts and Charting in Excel 0 March 28th 07 02:52 PM
Export from Excel to Word kath0178 New Users to Excel 2 September 13th 06 05:30 PM
How can I Export data from to Access to an Excel Template Chuck Excel Discussion (Misc queries) 0 July 6th 06 08:20 PM
can i export my excel page into a word doc? winfree Excel Discussion (Misc queries) 1 March 13th 06 06:49 PM
How do I export information from excel to word, ie database of na. Harry Gill Excel Worksheet Functions 1 April 4th 05 02:25 PM


All times are GMT +1. The time now is 10:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"