Call XML file with Adobe "Import Data" in VBA loop issue -


i trying mass-import xml files in specific folder create 1 pdf each xml file. i've created loop, vb code seems display prompt each file in directory, not selecting file (e.g., have select each file; prompt comes 5 times if have 5 files in directory).

here relevant part of code:

'retrieve target folder path user   set fldrpicker = application.filedialog(msofiledialogfolderpicker)  fldrpicker .title = "select target folder" .allowmultiselect = false if .show <> -1 goto nextcode mypath = .selecteditems(1) & "\" end  'in case of cancel nextcode: mypath = mypath if mypath = "" goto resetsettings  'target file extension (must include wildcard "*") myextenion = "*.xml"   'target path ending extension myfile = dir(mypath & myextension)  'loop while myfile <> ""   'open pdf file  theforma.open "c:\pdfformpath", "" 'pdf template accepts xml set theform = theforma.getpddoc set jso = theform.getjsobject   'select import jso.importxfadata myfile  'save form     = + 1     theform.save 1, "c:\pdfoutputpath" & "form_" & & ".pdf"     theforma.close true  'get next file name myfile = dir() loop 

i suspect there issue loop , calling myfile.

thank in advance in advice can offer!


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -