Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good Morning All,
I have worked with macros in Excel before and with the help of this discussion board managed to make some very complicated stuff work. Now, I have a different problem... I have data in an Excel sheet and based on that data I must compile a report in Word. The sheet is structured as follows: Criteria - Company A - Company B - Company C Info 1 Info 2 Info 3 Is it possible to create a macro to take information from each criteria and each company and export that information to a template in Word (Basically filling in the blanks). If it is possible, where should I begin? Thanks, Mike |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 3 Aug, 08:58, mike wrote:
Good Morning All, I have worked with macros in Excel before and with the help of this discussion board managed to make some very complicated stuff work. Now, I have a different problem... I have data in an Excel sheet and based on that data I must compile a report in Word. The sheet is structured as follows: Criteria - Company A - Company B - Company C Info 1 Info 2 Info 3 Is it possible to create a macro to take information from each criteria and each company and export that information to a template in Word (Basically filling in the blanks). If it is possible, where should I begin? Thanks, Mike Yes, no problem at all - something like Dim appwd As Object On Error GoTo notloaded Set appwd = GetObject(, "Word.Application") notloaded: If Err.Number = 429 Then Set appwd = CreateObject("Word.Application") End If appwd.Visible = True On Error GoTo 0 With appwd .documents.Add Template:="Path and Name of Template" 'now fill out the document appwd.activedocument.bookmarks("Whatever").Range.T ext = Range("Wherever").Value end with set appwd=nothing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
export information from excel to word doc template | Excel Worksheet Functions | |||
Export excel data to word document | Excel Discussion (Misc queries) | |||
Export spreadsheet data to PDF or Word document | Excel Programming | |||
How can I Export data from to Access to an Excel Template | Excel Discussion (Misc queries) | |||
export excel data to a word template using a macro | Excel Programming |