HI all,
Sorry to post this, but i cant seem to figure out whats wrong...
Im trying to copy data from a excel, each line should create a seperate word file. I have created about 35 book marks in the .dot file.
I looked at the code Colin posted:
here is what i think i should do
1. add the macro to the excel sheet.
2. add the With WDDoc.Bookmarks part for each bookmark
3. run it
Now my question is?
How do i edit the WDDoc.Bookmarks part, should it be cells to bookmark name ? if so how do i handle different rows ?
I hope you can help me out here
Sorry to post this, but i cant seem to figure out whats wrong...
Im trying to copy data from a excel, each line should create a seperate word file. I have created about 35 book marks in the .dot file.
I looked at the code Colin posted:
Sub CopytoWord()
Dim WDApp As Word.Application
Dim WDDoc As Word.Document
On Error GoTo ErrorHandler
Set WDApp = New Word.Application
With WDApp
Set WDDoc = .Documents.Add(Template:="C:\Documents and Settings\minime\Desktop\081208\Detailedtest.dot")
.Visible = True
End With
With WDDoc.Bookmarks
'Amount
.Item("amount").Range.InsertAfter ActiveCell.Value
'Share Amount
.Item("shareamount").Range.InsertAfter (ActiveCell.Value / 1000)
End With
here is what i think i should do
1. add the macro to the excel sheet.
2. add the With WDDoc.Bookmarks part for each bookmark
3. run it
Now my question is?
How do i edit the WDDoc.Bookmarks part, should it be cells to bookmark name ? if so how do i handle different rows ?
I hope you can help me out here