Excel 2013 Macro -- creates readOnly PDF document ?

Does anyone have an example
Excel 2013 Macro that creates readOnly
PDF documents so I can program
the below step #2, Create PDF ?

1. Quote_Tool_Template.xlsm and Quote_Template.docx get deployed to salesRep’s local C:\a drive so they can do anytime, regardless of INTERNET connection
2.      SalesRep opens Quote_Tool.xlsm enters their next quote # based on their SalesRep# (i.e. Jim's quotes are 1###, Jane’s are 2###,  etc), fills out other info, clicks “Create PDF”
3.      System automatically does below
a.      creates Quote_Tool_1###.xlsm so user can easily edit later and click “Create PDF” to overwrite existing PDFs if need
b.      closes Quote_Tool_Template.xlsm without saving changes
c.      inserts Quote_Tool_1###.xlsm data onto Quote_Template.docx
d.      saves Quote_Template.docx as Quote_1###.docx
e.      closes Quote Template.docx without saving changes
finance_teacherAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kanti PrasadCommented:
Hi

Here is a sample. It create pdf for all the worksheets with in a xls book.

Sub createPDFfiles()
    Dim ws As Worksheet
    Dim try As String
    For Each ws In ActiveWorkbook.Worksheets
        On Error Resume Next
     
       try = ActiveWorkbook.Name & "-" & ws.Name
      '  try = ws.Cells(3, 5)
      '   try =  “c:\” & ActiveWorkbook.Name & "-" & ws.Name
      ' Set AtoK = ws.Range(ws.Range("A1"), ws.Range("K" & Cells.Rows.Count).End(xlUp))
        ws.ExportAsFixedFormat _
            Type:=xlTypePDF, _
            Filename:=try, _
            Quality:=xlQualityStandard, _
            IncludeDocProperties:=True, _
            IgnorePrintAreas:=False
    Next ws
End Sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.