Microsoft Excel 2010 - Macros Writing Lesson 4 - How to generate Word Docs from Excel

Microsoft Excel 2010 - Macros Writing Lesson 4 - How to generate Word Docs from Excel


Please visit http://www.techflutter.com to download the code and see our other macros. We also provide a custom macro service, see our website for more details.

See Macro 9 which is an add-on for Macro 4. It will allow you to automatically enter commas into your currency values in Word.
Closed Caption:

hi folks it's gone today is lesson for
and i'll be showing you something quite
interesting today so we have a she here
i made a burner on and we have four
different columns fort with client
number on client name and we also have
two other pieces of information so we
have a total fee which is to be paid
which is a hundred girls and column C
then we have the total and the total
amount of being paid and also in column
deed and the total out that was a
standing so what this macro does is it
will take all this data and for each
each person each client it will generate
a matter according to specific to them
and we're saving a file so what I'm
going to do first is not to run the
macro and i'm going to then go to the
code just to show you how it works
so you can get grass for that as well so
what I'm going to do is I'm just going
to show you this macro which folder
which is the output folder and I'm going
to run the macro here on the left-hand
side so i'll click view macros macros
i'm going to run this one's called micro
so what you see here on the right here
is you'll see and the dlc x-files be
generated for each individual user so
there should be an m16 buzz and total
that's correct or 16 and 16 different
users now bear in mind there's two
different types of output documents are
going to consider her the first one is
for people who don't have any money of
standing on their account so for example
this value here is 0-3 individuals like
that and then for the rest of the
individuals we have turkey roles of them
and they all have money remain on their
account so i'm going to go through two
different and two different and types of
and export word documents
ok folks so i'm just going to show you
the macro name and how it works and i
will hit out at f/11 just to get into
the microcode if you do need a copy of
the same code i'll be more than happy to
give it you just email us are m.tech
folder @ gmail.com or you can follow us
on Twitter attack for no issues at all
ok so this disco does build on the
previous lessons that we looked at and
and we have our submicron defining the
macro we have our application . screen
of death n equals false and we also have
that at the bottom as well
application.screenupdating equals true
ok so about won't let the excel file
refraction at speeds of the process now
several different variables here i have
to find I have counter which is the main
character of the program i also have
total counter which is the which is
going to count up to the very end up to
find the limit of the micro and how long
the micro wrong so as we did before in
previous lessons and we did this section
of code here just it run the total count
to see how many roles and take the loop
mainly people have to go to so it's very
use of we also have names with this will
be the name of the client and then we
have the amount and that is old day off
and also and then client as long which
is and and declined said number of the
client number one so I'm just going to
initialize the variables here i have
counter equals 22 ok so character equal
to is because if you go back into your
xl5 and we want to start here so that's
why counter is equal to 2 we could set
the total count of one it doesn't really
make a difference but we have to set
count or equal to 2 here because we have
this header row
back into the corner and then we have
the main loop of the program so the main
loop of the program is that the main
part here on we have the definition here
heard of criteria for the main aim of
the program it's a doin to counter
equals to $OPERAND total counter so once
the camper is is counted up to the total
counter that this little stock and the
increment here for total counter is down
here so counter equals counter +1 now we
actually have two different em snippets
of code here so i actually went into
microsoft word and i run a macro to
record what I wanted but you have to
enter into some extra code in front of
did the market up is generated from work
for it to work ok so I'm just going to
go through the m2 the create object here
did a couple of six steps you have to do
you have to enter in this code here and
in order to create a word and object so
it's set obj word is equal to create
object word.application and he wanted
set this one as well equals to fall so
that the word them word won't keep a
fraction so to speed up the process
efficient and then you this extra line
of code here set obj doc and equals
always a word
the doctors that are also this last one
here you'll need this is so outset
object selection equals object work the
selection so you can copies straight in
there is no issues whatsoever it's fixed
text the next one it is and you want to
enter the date so this will actually
pull out today's date for you so far you
go into one of the files for example and
let's go into Becky i'll just show you
here so this is the date that the micro
Apollo only pull up today's date is
different format date as well and if you
want to use that if you can record a
micro Microsoft Word and just click and
surf on date and time and pick whichever
one of these you like on then you can
take that code in that code for
microsoft them were that micro coulomb
input a denture excel file the code in
the excess flow if you want to change
that they can
going to close this down okay so we have
the date the next thing is the this this
snippet will this typical them with
generate this will generate them and no
10 so basically putting the text so
we've got some different items here that
would be m and different every time you
have the names which we pulled it from
this hair cells counter is to that will
actually pull out the name free then we
have to try number then client numbers
pull that each time from this encounter
months of sales counter water reason
counter encounters to in reading and 72
and 11 put out the client name and we
also have then the am
this part here which will actually save
the document so each document as you
notice there how to name that is safe so
i'm not using the name the name here to
to assign each document and an
individual named that's good practice as
well and then the next part then is just
to have this part of cold here which is
obj word quick so that'll actually close
Microsoft Word down each time after each
iteration is run
ok so the first snippet of code was for
this letter which is the matter to send
to somebody if they've fully paid so for
example these treat people here they're
fully paid they don't have any
outstanding money on to pay their
account so the letter that will be sent
to them if i take and number two which
is Jack find Jack here so this will be
the letter that will be sent to them so
this is a note to say that your account
is paid in full on the other hand we
have some individuals who haven't paid
so we need to generate a separate letter
for them and these are the people there
who haven't paid and they still have
money and standing on their account so
they lead to have a separate letter to
go back in here to the code so what the
fine start then this this if statement
within the loop so if amount is equal to
0 here so if there's no money basically
standing on their account
we'll run this section this will
generate that the word document just to
say this this is another save your
account is paid in full
otherwise if amount does not equal to 0
so if there is still money outstanding
on their account we run this snippet of
code here so we have exactly the same as
i showed you before just to create the
the word document inserting the date and
then we have and two main snippet them
for snippet of code for and to put in
them amount don't need to put in the
amount of this time we need to put in
the name on also the client number so
the only thing different is this section
of cold here to have the amounted so we
need to say okay your account that is
standing by X and we need to read that
in each time from here so it does it
separately each time and also we will
save two foot just important saved by
the end and also to give it that unique
name for each person I mean you can put
the toy number here if you wanted you
can use on percent as well so just give
it show you an example of one of those
documents so we will pick a person for
example doesn't have money paid let's
pick for them for example for them it
always 85-yard her account i'm just
going to go into fidelis better on this
is your name give your flight number
which is 12 here and she owes a
five-year-old's so you can have as many
as many columns of data here that you
you need to have I'm you can customize
your your em you can customize your RM
your word document template so you just
go into tools or Edward and record a
macro and customize it and remember
Dennis the last bit of cold here just
two quick word
so if you have any further questions you
can follow us on twitter it's off text
folder or you can email us text floater
@ gmail.com
I'm really more than happy to help you
and you'd like a copy of this xml file
in sends an email and we can send and
you

Video Length: 10:55
Uploaded By: James Tech
View Count: 33,145

Related Software Products
Help Generator for Microsoft Excel
Help Generator for Microsoft Excel

Published By:
AGORA Software BV

Description:
Help Generator for Microsoft Excel lets you document your Excel spreadsheet applications in a productive way. It generates topic pages with screenshots for Worksheets, Charts and VBA Forms. The Help Generator produces HTML Help, HTML Help web-based help and documentation in Word. Within Worksheet pages sections are created for ranges (tables), embedded charts, formulas, controls, filters and cubes. MS forms pages contain sections for controls and screenshots with hotspots. Produces HTML Help, ...


Related Videos
Generate Random Numbers in Excel
Generate Random Numbers in Excel

http://myexcelcharts.blogspot.com How to generate random numbers in Excel. Three examples (00:10) Using the RAND function, (00:42) using the RANDBETWEEN and (01:46) using the Data Analysis Toolpak Random Number Generator option hr / bClosed Caption:/b hi in this session will show you how to create random numbers or generate random numbers and i'll show you three examples now the first example is a first two examples are ...
Video Length: 05:46
Uploaded By: Doug H
View Count: 112,461

How to generate a Random List in Excel
How to generate a Random List in Excel

http://www.xlninja.com/2012/06/13/how-to-generate-a-random-list-in-excel/ A video on how to generate a random list in Microsoft Excel using a combination of the RANDBETWEEN function and the VLOOKUP function. hr / bClosed Caption:/b hello this is other from xcel ninja . com today I'm going to show you how to create a random list there from a starting point that is this particular list of 27 so names and could bebr ...
Video Length: 04:22
Uploaded By: Aldo Mencaraglia
View Count: 112,341

Bingo Card Generator - Microsoft Excel
Bingo Card Generator - Microsoft Excel

Find this game and others at: http://www.uncw.edu/EdGames This is a tutorial video that shows how to use the Microsoft Excel bingo card generators found on uncw.edu/edgames . Bingo is one of the best board games for use in the classroom. Yet, it takes so long to create 20 or 30 unique bingo cards. This Microsoft Excel Bingo Card Generator saves all that time allowing you to type in one card, and then it will create the rest. The tutorial shows the 3x3, 4x4, and 5x5 bingo card ...
Video Length: 07:48
Uploaded By: uncwedgames
View Count: 56,411

Generate Random Numbers (Integers) in Microsoft Excel
Generate Random Numbers (Integers) in Microsoft Excel

http://www.TeachMsOffice.com This tutorial shows you how to generate random integers or whole numbers in Microsoft Excel. You can generate a number between any two numbers in excel by using the RANDBETWEEN() function. Here, you learn how to make and use the randbetween() function and also how to update the random numbers making them change using the keyboard shortcut "F9" to 'refresh' the numbers. This also shows you how to create a list of randomly generated numbers. br ...
Video Length: 02:28
Uploaded By: TeachExcel
View Count: 50,146

VBA Excel - Invoice Generator - Microsoft Excel 2010
VBA Excel - Invoice Generator - Microsoft Excel 2010

http://www.onlinepclearning.com Excel VBA - Invoice Generator - Microsoft Excel 2010 -This is a Microsoft Excel VBA project that creates an Invoice Generator that is free to use. The data is stored in 2 sheets (databases) and filter to your criteria. The purpose of this project is to help with your VBA and general Excel skills in basic application development. The template is for Excel 2010 however this application will run fine if created in Microsoft Excel 2003 /2007. I will be ...
Video Length: 08:19
Uploaded By: Trevor Easton
View Count: 22,437

Bingo Card Generator - Microsoft Excel Free Download
Bingo Card Generator - Microsoft Excel Free Download

* Update 5/5/2016 * I updated the file significantly and a made an instructional video (with sound). Please see: https://www.youtube.com/watch?v=YctjF... This is a spreadsheet I wrote to generate "Bingo" cards automatically. It can be used to generate Bingo cards for a review game, shower game, or to to help overcome general boredom. To allow the spreadsheet to generate the cards automatically, you must enable macros when you open the file. Otherwise you may generate a ...
Video Length: 02:29
Uploaded By: PrerequisiteName
View Count: 22,000

Generate Random Numbers with Decimals in Microsoft Excel
Generate Random Numbers with Decimals in Microsoft Excel

http://www.TeachMsOffice.com This tutorial shows you how to generate random numbers which have decimals in excel. This means the numbers will not just be integers; they will be decimals or fractions between two limits which you set. This is similar to the RANDBETWEEN() function except that that function only returns integers. Here, the RAND() function is used to create the decimal numbers in excel. To get the spreadsheet used here of for more excel video tutorials, ...
Video Length: 04:31
Uploaded By: TeachExcel
View Count: 19,833

Excel VBA - Invoice Generator - Microsoft Excel 2010 - Part 2
Excel VBA - Invoice Generator - Microsoft Excel 2010 - Part 2

http://www.onlinepclearning.com Excel VBA - Invoice Generator - Microsoft Excel 2010 - Part 2 This part 2 of the Microsoft Excel VBA project that creates an Invoice Generator that is free to use. The data is stored in 2 sheets (databases) and filter to your criteria. The purpose of this project is to help with your VBA and general Excel skills in basic application development. The template is for Excel 2010 however this application will run fine if created in Microsoft Excel 2003 /2007. ...
Video Length: 12:40
Uploaded By: Trevor Easton
View Count: 12,319

Microsoft Excel 2010 - Macros Writing Lesson 3 - How to generate Graphs using Macros
Microsoft Excel 2010 - Macros Writing Lesson 3 - How to generate Graphs using Macros

Please visit http://www.techflutter.com to download the code and see our other macros. We also provide a custom macro service, see our website for more details. hr / bClosed Caption:/b let's go folks today I'm gaunt show you lessons free which is a macro had generate across and Microsoft Excel so we have seventh outta here this is Justin you said it generator we have find number name find and matter talk feat that they ...
Video Length: 09:41
Uploaded By: James Tech
View Count: 7,743

Excel VBA - Invoice Generator - Microsoft Excel 2010 - Part 5
Excel VBA - Invoice Generator - Microsoft Excel 2010 - Part 5

http://www.onlinepclearning.com Excel VBA - Invoice Generator - Microsoft Excel 2010 - Transferring the data with some Excel VBA code. This is a Microsoft Excel VBA project that creates an Invoice Generator that is free to use. The data is stored in 2 sheets (databases) and filter to your criteria. The purpose of this project is to help with your VBA and general Excel skills in basic application development. The template is for Excel 2010 however this application will run fine if created ...
Video Length: 15:42
Uploaded By: Trevor Easton
View Count: 4,613

Copyright © 2025, Ivertech. All rights reserved.