Solved

Creating new files and file names from data within Excel

Posted on 2013-10-27
4
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Expert Comment

by:als315
ID: 39603848
Do you like to make copies of your pdf template with new names?
0
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39603870
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
ID: 39604220
Thank you!. Works perfect!!
0
 

Author Closing Comment

by:dgd1212
ID: 39604222
Thank you!! perfect!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

726 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