Hey Guys just found your forum a couple of days ago!
I have been trying to make some reports from excel to word, and I could get it right! let's say I have 5 customers from which I have to make a report, they could n customers! (this is my hardest part)
Which i have to add them on the blank, them move it to word, i would really appreciate your time, thank you so much and have a good day
Juan Carlos
I have been trying to make some reports from excel to word, and I could get it right! let's say I have 5 customers from which I have to make a report, they could n customers! (this is my hardest part)
Which i have to add them on the blank, them move it to word, i would really appreciate your time, thank you so much and have a good day
Juan Carlos
VBA Code:
Option Explicit
Sub CreateReporteWord()
Dim WordApp As Word.Application
Set WordApp = New Word.Application
With WordApp
.Visible = True
.Activate
.Documents.Add
' Inicio del Documento, Nombre de documento
With .Selection
.BoldRun
.Font.Underline = wdUnderlineSingle
.Font.Name = "Courier New"
.Paragraphs.Alignment = wdAlignParagraphCenter
.Font.Size = 12
.TypeText "Customers Report"
.Font.Underline = False
.TypeParagraph
.BoldRun
.TypeText " Customer data, views as product. As an example"
.TypeParagraph
.Font.Underline = False
' Insert customers
.BoldRun
.TypeText "Name: "
.BoldRun
.Paragraphs.Alignment = wdAlignParagraphJustify
.Font.Underline = wdUnderlineSingle
.TypeText "_____________________"
.Font.Underline = False
.BoldRun
.TypeText "Amount "
.BoldRun
.Font.Underline = wdUnderlineSingle
.TypeText "_____________________"
.Font.Underline = False
.BoldRun
.TypeText "Years "
.BoldRun
.Font.Underline = wdUnderlineSingle
.TypeText "_____________________"
.Font.Underline = False
.BoldRun
.TypeText "Int "
.BoldRun
.Font.Underline = wdUnderlineSingle
.TypeText "_____________________"
.Font.Underline = False
End With
End With
End Sub