Select the template to be filled with your Excel Data. Select location of Template and the location where you would like to save the new word document. Free templates and templates with code are available for purchase for $50 USD
www.easyexcelanswers.com/temp...
Click this link to check out my one-on-one training www.calendly.com/easyexcelanswers
For more help visit my website www.easyexcelanswers.com or email me at easyexcelanswers@gmail.com.
Contact me regarding customizing this template for your needs.
Click for online Excel Consulting www.calendly.com/easyexcelanswers
Are you struggling to update your Microsoft SQL Server data?
I recommend using well-known Excel to update and manage your data in SQL Server using the SQL Spreads Excel add-in.
Click sqlspreads.com/?pid=barbhende... to find out how SQL Spreads works best for non-technical end users and download our free 14-day trial. You will get two months free when purchasing an annual subscription using our link.
I am able to provide online help on your computer at a reasonable rate.
www.amazon.com/shop/barbhende...
I use a Blue condenser Microphone to record my videos, here is the link
amzn.to/37gyyGa
Check out Crowdcast for creating your webinars
app.linkmink.com/a/crowdcast/83
I use Tube Buddy to help promote my videos
Check them out
www.Tubebuddy.com/easyexcelan...
Follow me on Facebook
/ easyexcel.answers
IG @barbhendersonconsulting
You can help and generate a translation to you own language
kzitem.info_cs_p...
*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I've used or have experience with.
How to insert VBA code in Excel • How to insert VBA code...
Sub ReplaceText()
Dim objWord As Object
Dim objDoc As Object
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add
Dim temdoc As Word.Document
Dim custN, path As String
Dim objfind As Find
Dim r As Long
Dim first As Range
r = 2
Do While Sheet1.Cells(r, 1) does not equal ""
Set wApp = CreateObject("Word.Application")
objWord.Visible = True
'***********************************************************
MsgBox ("Please select the location of the word template")
uploadfile = Application.GetOpenFilename()
strFile = uploadfile
If uploadfile = False Then Exit Sub
Documents.Open strFile
'**************************************************************************
Set objWord = wApp.Documents.Open(strFile, ReadOnly:=True)
With objWord
.Application.Selection.Find.Text = "[[contact name]]"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 1).Value
.Application.Selection.EndOf
ActiveDocument.Bookmarks("\StartOfDoc").Select
.Application.Selection.Find.Text = "[[contact phone]]"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 2).Value
.Application.Selection.EndOf
ActiveDocument.Bookmarks("\StartOfDoc").Select
.Application.Selection.Find.Text = "[[address]]"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 3).Value
.Application.Selection.EndOf
ActiveDocument.Bookmarks("\StartOfDoc").Select
.Application.Selection.Find.Text = "[[city]]"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 4).Value
.Application.Selection.EndOf
ActiveDocument.Bookmarks("\StartOfDoc").Select
.Application.Selection.Find.Text = "[[Prov]]"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 5).Value
.Application.Selection.EndOf
ActiveDocument.Bookmarks("\StartOfDoc").Select
.Application.Selection.Find.Text = "[[postal code]]"
.Application.Selection.Find.Execute
.Application.Selection = Sheet1.Cells(r, 6).Value
.Application.Selection.EndOf
custN = Sheet1.Cells(r, 1).Value
Dim fldr As String
MsgBox ("Please select the location for the file to be saved")
With Application.FileDialog(4)
.AllowMultiSelect = False
If .Show does not equal -1 Then Exit Sub
fldr = .SelectedItems(1)
End With
path = fldr & "\"
.SaveAs path + custN, FileFormat:=wdFormatDocumentDefault
End With
r = r + 1
Loop
End Sub
Негізгі бет Select the template to be filled with your Excel Data
Пікірлер: 4