VBA Help

Reizup613

New Member
Joined
Feb 27, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
My goal is something similar to what mail merge does only by using a VBA Code to automate it a little more.

Right now I have an Excel Spread Sheet that is generated each month and a Microsoft Word Template. Each time this Excel Spreadsheet is generated and saved into a file, I have a power query set up to extract specific data into a table.

I am attempting to figure out a VBA Code that will pull the first row of data, fill it into the Microsoft Word Document where each piece goes (example, date top left, Dear (name), etc. Then, I need the word document to Save As PDF and have it pull from that same excel spreadsheet the name to be saved as, Once complete, I want it to close the word template, without saving it, reopen the template and run again with the next row of data.

Codes I’ve found online similar to this have not been working for me and I cannot figure out why. I’m extremely new to this.

Any assistance is SO appreciated.

Thank you.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi,

A couple of recommendations :
1. Break down your projects in small buildings blocks (that you will combine together, at the end ...)
2. Turn on your macro recorder and perform your process 'manually' ... you will get a VBA 'translation' of your actions.
 
Upvote 0

Forum statistics

Threads
1,224,811
Messages
6,181,082
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top