Excel Macro to create PDF files using Word template

  Рет қаралды 14,411

Extreme Automation - Kamal Girdher

Extreme Automation - Kamal Girdher

Күн бұрын

Пікірлер: 41
@alane3983
@alane3983 3 ай бұрын
I think this is the solution I am looking for. Very good content, even 4 years later.
@HamzaMalik-dj3wu
@HamzaMalik-dj3wu 2 жыл бұрын
Exactly what I was looking for. Can't tell you how happy I am to have found this video!
@sdasgupta18
@sdasgupta18 2 жыл бұрын
Very helpful. Simple and solid solution. Thank you very much!
@xtremeExcel
@xtremeExcel 2 жыл бұрын
You are welcome😀
@j.dasilva4567
@j.dasilva4567 2 жыл бұрын
Very very good, used it already. Thank u very much.
@michaelgonzalez3251
@michaelgonzalez3251 2 жыл бұрын
This video is very helpful
@xtremeExcel
@xtremeExcel 2 жыл бұрын
Thanks.. stay connected
@FreeFrogWatching
@FreeFrogWatching 7 ай бұрын
great video. This is close to what I am looking. I have a list in excel like this and Word mail merge. Do you know how to create a print button to print what row I select? or enter a row number to print?
@Drivad2k10
@Drivad2k10 Жыл бұрын
Thanks for the video - I'm getting a Run-Time Error when I hit 'Set wd = New Word.Application' - any idea why this could be?
@aniketgad6786
@aniketgad6786 2 күн бұрын
I am getting error in ".Replacment.Text = Cells(i, 1).Value", like Compile error: Method or data member not found
@meherasees1790
@meherasees1790 3 жыл бұрын
Can you please help how to make the for loop dynamic
@sofiarumi4288
@sofiarumi4288 2 жыл бұрын
Love the video! thank you! I seem to get stuck at wd.Selection.Find - giving this error: Object variable or with block variable not set. Please help!!!
@sofiarumi4288
@sofiarumi4288 2 жыл бұрын
Sub createPDFs() Dim wd As Word.Application Dim doc As Word.Document Set wd = New Word.Application wd.Visible = True For i = 2 To 7 Set doc = wd.Documents.Open("CC:\Users\sai\Documents\AP\xl to pdf\Template\Temp.docx") With wd.Selection.Find .Text = "" .Replacement.Text = Cells(i, 3).Value .Execute Replace:=wdReplaceAll End With doc.ExportAsFixedFormat OutputFileName:=ActiveWorkbook.Path & "/" & Cells(i, 1).Value & "_" & Cells(i, 2).Value & "_" & Cells(i, 4).Value & "_" & Cells(i, 3).Value & "_" & Cells(i, 5).Value & "_" & Cells(i, 6).Value & "_" & Cells(i, 7).Value & ".pdf", _ ExportFormat:=wdExportFormatPDF Application.DisplayAlerts = False doc.Close SaveChanges:=False wd.Quit Application.DisplayAlerts = True Next End Sub
@intagoeng9532
@intagoeng9532 3 жыл бұрын
Thank you sir, this is very helpful! I have just one doubt- is it possibile to save pdf(s) by selecting a folder using the Application.FileDialog(msoFileDialogFolderPicker)? I'm trying with no success
@sridharkrishnappanavanerth3388
@sridharkrishnappanavanerth3388 4 жыл бұрын
sir if the name column has first name and surname and i want pdf to be saved with only first name and unique id only, then what should i do.
@xtremeExcel
@xtremeExcel 4 жыл бұрын
You can extract first name using string manipulation functions (left, right, mid, len, instr etc).
@ignacioa3698
@ignacioa3698 4 жыл бұрын
You have webscraping for google chrome using Excel VBA? I tried using downloading Selenium but keep getting an error, I believe it may have been selenium download, google driver issues since I’ve read there’s issue with that? I’ve read Selenium has compatibility with Chrome old drivers? Even someone else in Github wrote a Selenium VBA code, and tried using that one, yet, didn’t work. dont know how to fix the issue. I’ve even completely uninstalled Chrome and installed Chrome again to begin from scratch, yet, kept getting error. If you can show the options using Selenium and how to download Selenium? And or if there are alternatives? Thx!
@xtremeExcel
@xtremeExcel 4 жыл бұрын
SeleniumWrapper is no longer supported and has been replaced by SeleniumBasic: florentbr.github.io/SeleniumBasic/ However, I recommend to use java or python as programming language if you want to use selenium.
@ignacioa3698
@ignacioa3698 4 жыл бұрын
@@xtremeExcel Thank youu. Yes, alternatively, I'm trying python w/Beautiful Soup to scrape data from an yahoo finan (a html page).
@tengtaichuang5456
@tengtaichuang5456 2 жыл бұрын
May I know why there is a compile error "Next without For"?
@j.dasilva4567
@j.dasilva4567 2 жыл бұрын
cause u are ending a /while/ cicle using a /next/ instead of /wend/, or else u are using a /next/ having a previous /next/, or else u are closing a /for/ cicle u didnt start.
@naive8547
@naive8547 2 жыл бұрын
Thank you very much. I wrote the code but I think there's a lot of error. I wish I could've sent ss
@xtremeExcel
@xtremeExcel 2 жыл бұрын
Please send if you need help😀
@rashmidhanda4370
@rashmidhanda4370 4 жыл бұрын
Hi thanks for the nice video..I need to attach pdf copies to the word doc template and then use the mail merge to send out mass emails I m able to create the emails using mailmerge and list but unable to add PDFs can you plz help..
@PrajyotNikhade
@PrajyotNikhade Жыл бұрын
Hello sir...I am getting extra space in pdf when middle name is blank. Is there any solution sir plz help
@jainmohit09
@jainmohit09 4 жыл бұрын
Hi I have a image in word and want to add different name on that image. So I add text box. But when I run the macro all pdf show same name. Pls help
@tengtaichuang5456
@tengtaichuang5456 2 жыл бұрын
Hi Kamal, what if in my Word doc, there are more than one mail merge field, then how do I set the macro to include these fields to replace in every subsequent pdf?
@khat_diveprivate2518
@khat_diveprivate2518 Жыл бұрын
I have the same question. I have up to 20 merge fields.
@sarathysaru2104
@sarathysaru2104 4 жыл бұрын
hi can you please guide to save with header and footer of the word, in the current above code header is not getting saved
@xtremeExcel
@xtremeExcel 4 жыл бұрын
please send your file(having vba) to me.
@subharamachandran6753
@subharamachandran6753 2 жыл бұрын
Hi.. I jus copied ur code.. pdf is getting created.. however none of the fields are merged.. what am I missing here.. can you help me.. thanks in advance.
@subharamachandran6753
@subharamachandran6753 2 жыл бұрын
Find in vba is not recognizing the merge fields in the template and hence not replacing them. Please help to fix this
@randy9833
@randy9833 7 ай бұрын
can u help me. (Office 2012) So i already follow ur step completely. no error but it wont create the PDF. can u help me? Thank you Sub createPDFs() Dim wd As Word.Application Dim doc As Word.Document Set wd = New Word.Application wd.Visible = True For i = 2 To 7 Set doc = wd.Documents.Open("D:\Folder Sampah\Surat CB\template.docx") With wd.Selection.Find .Text = "" .Replacement.Text = Cells(i, 1).Value .Execute Replace:=wdReplaceAll End With doc.ExportAsFixedFormat OutputFileName:=ActiveWorkbook.Path & "/" & Cells(i, 2).Value & "_" & Cells(i, 1).Value & ".pdf", _ ExportFormat:=wdExportFormatPDF Application.DisplayAlerts = False doc.Close SaveChanges:=False Application.DsplayAlerts = True Next wd.Quit End Sub
@LOL-ho4rt
@LOL-ho4rt 2 жыл бұрын
Hi I pretty much copied your code exactly and got a compile error. can you please help?
@LOL-ho4rt
@LOL-ho4rt 2 жыл бұрын
when I put Next wd.Quit End Sub it shows Compile error : Next without For and when I put Next wd.Quit End Sub It shows Compile error : Expected Function or variable Thanks,
@xtremeExcel
@xtremeExcel 2 жыл бұрын
Can u share the complete code pls?
@icamaril7
@icamaril7 Жыл бұрын
Hi, word to PDF? Help me please
@sudhaposa4216
@sudhaposa4216 3 жыл бұрын
Sir, I need this coding file
How to Create & Use Excel Macros (Real world example)
10:09
Leila Gharani
Рет қаралды 1,8 МЛН
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
Excel - Create PDF Files from a Spreadsheet - VBA Macro Mail Merge Tutorial
40:37
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 24 М.
Create PDF files for each Excel Rows by using Macros
9:26
Geek Decoders - Power BI Learning
Рет қаралды 35 М.
Bulk Emails | Word template as Outlook Body | Excel macro(vba)
16:30
Extreme Automation - Kamal Girdher
Рет қаралды 28 М.
Learn Excel MACROS in 10 Minutes Using Real World Examples
9:13
Kenji Explains
Рет қаралды 1,2 МЛН
Automation: Bulk Files (Excel, Word and PDF) Creator in Excel VBA
14:46
PK: An Excel Expert
Рет қаралды 20 М.
Create multiple PDFs based on a list in Excel | Excel Off The Grid
13:02
Excel Off The Grid
Рет қаралды 38 М.
(1/2) Automating Word Documents from Excel - No VBA
4:37
Andrew Ligon Fant
Рет қаралды 394 М.
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН