View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JS SL JS SL is offline
external usenet poster
 
Posts: 49
Default Copy data of records to a templatesheet and save this template as pdffile (and then the other records one by one)

Hello, if somebody can help me out :)

I have a sheet with several records which I have to copy to a template sheet and then save/print this sheet as a pdf file on a specific place with a specific name. After the first record the next one has to follow the same rule till the last record.

Sheet1:
Column A exist "Y or N" if this record should be copied to the templatesheet for saving/print as pdf for this specific record.

If Yes in column A; (record 2 till last used);

1a) then.. copy for this specific record the data in Sheet1 ColumnD till Z to sheet2 datafield D4 with a 'transpose' action (you then get the data in Sheet2 in Column D4 till D26).

1b) Then also copy for this specific record the data in Sheet1 Column BB till BD to Sheet2 datafield D30 with a 'transpose' action (you get tje data in sheet2 in Column D30 till D33).

2a) then.. save/print the file as pdf with the filename as mentioned in Sheet1 column B of the same record (could be like 'Template-Blabla' - becomes then 'Template-Blabla.pdf').

2b) The save/print the file should be saved to the directory as mentioned in Sheet1 Column C of the same record (could be like 'C:/Apps/Templates').



After the macro is finished I'd created several pdf files as mentioned in Sheet1 where in Column A the text "Y" is registered.


Hopely explained clear. And hopely somebody to help me out.

regards, Johan