Solved

Creating new files and file names from data within Excel

Posted on 2013-10-27
4
200 Views
Last Modified: 2013-10-27
Not sure if this is even possible...

In a directory I have a template checklist PDF file. In same directory I have a spreadsheet that contains a list of product numbers.

Is it possible to take that template checklist PDF file and add a product number to its file name and then save

Then repeat the process till all the product numbers are attached to the template.

In effect creating new files in addition to the template file.  The directory looking like:
Template Checklist.PDF
Template Checklist_001.PDF
Template Checklist_002.PDF
Template Checklist_003.PDF
etc..
0
Comment
Question by:dgd1212
  • 2
4 Comments
 
LVL 39

Expert Comment

by:als315
Comment Utility
Do you like to make copies of your pdf template with new names?
0
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
Hi,

pls try

Sub Macro()

strFileCopyFrom = ThisWorkbook.Path & "\" & "Template Checklist.pdf"
For Each c In Range(Range("A2"), Range("A" & Cells.Rows.Count).End(xlUp))
    strFileCopyTo = ThisWorkbook.Path & "\" & "Template Checklist" & "_" & Format(c, "000") & ".pdf"
    FileCopy strFileCopyFrom, strFileCopyTo
Next
End Sub

Open in new window

Regards
TestPdf.xlsm
0
 

Author Comment

by:dgd1212
Comment Utility
Thank you!. Works perfect!!
0
 

Author Closing Comment

by:dgd1212
Comment Utility
Thank you!! perfect!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now