Exporting multiple e-mails as .pdf
I'm responsible for coordinating a multi-author, book-writing project and I've been asked to store all e-mail correspondences in a fashion that allows all of the authors and project managers to access the e-mails. I have a shared folder set up on my Google drive that allows all the users to access shared files which is working fantastically, but I can't find a way to export large quantities of e-mails at the same time that also works for Google drive.
After a quick Google search I found this site which provided instructions on how to install this set of scripts which allowed me to archive my selected e-mails as .rtf files with their attachments. It works great and allows me to customize the naming of the files to allow other authors to easily locate a specific e-mail. It names each file "From %f to %t - %s - %M %d, %Y.rtf" where %t is the recipient, %f is the sender, %s is the subject/thread topic and %M %d, %Y is Month day, year (eg To John Smith from Jane Doe - Book Project - December 12, 2012.rtf).
Unfortunately, after uploading the folder containing all these .rtf files I found out that .rtf can't be viewed on Google and must be downloaded then opened on the user's computer. To fix this I tried having Google automatically convert the files to Google docs as it uploaded the files, but this didn't work and even if it did I fear the files would lose their attachments.
I then tried searching for scripts that would allow me to change all of the .rtf files to .pdf. I found and tried a few, but they all had problems (the script would only operate on pre Mountain Lion, the requires Word for Mac, etc.)
Then I tried finding a script that would work like the first successful one, but export the files as .pdf rather than .rtf. I couldn't find anything, but found an article that reminded me I could print to .pdf from mail ("Save as PDF..." in the system print window). I tried doing this, but after 'printing' the first of all the e-mails an error box pops up and no more e-mails 'print.' If I "Open PDF in Preview" I can successfully save all of the e-mails as .pdf, but their file names are all Preview of "<e-mail subject>".pdf which isn't helpful because nearly all correspondences in the group have a subject like "Book" or "Book Project" meaning it'd be impossible to determine which e-mail is which by the .pdf filename.
I feel like their are a lot of different routes I can take to solve this problem, I just need help finding the components:
1. Use the first successful script to export as .rtf, then use another script to convert them to .pdf. This would be the best because it will allow me to use a useful filenaming system. To do this I need a script that can convert .rtf to .pdf on my system.
2. Find a script like the first, successful script I used that allows me to export the e-mails as a .pdf using the subject, to/from, etc. as the filename.
3. Open PDF in Preview, save, then use a script to rename all the files by extracting the subject, to/from and date from the .pdfs. To do this I need a script that can find the subject, etc. in the .pdf and use that data to change the file name. (I highly doubt such a script exists and I don't have the script-writing skills to create one myself.)
4. Any other solution that allows me to take a lot of e-mails from my Mail app and upload them to my Google drive while maintaining attachments and generating logical filenames.
5. Any other solution that makes it possible for me to make correspondences available for all authors to access (keeping in mind that cross-platform compatibility is essential).
Suggestions?
I found your first suggestion while doing a Google search. That post was made in mid-2011, almost a year before Mountain Lion released. Apple changed the way scripts work in Mountain Lion and this script no longer works.
As far as I can tell, the second solution only works for printing one e-mail to a .pdf at a time and doesn't support batch filenaming.
Similar Messages
-
Script to batch export multiple Books (.indb) to PDF
I have multiple InDesign Book files that I would like to batch export to PDFs, respectively. (Not looking to combine multiple books into a single PDF. Just a 1 to 1 PDF export for each Book file.)
In googling for an answer, I found Peter Kahrel's script for doing just this for other InDesign files, but it does not work for Books. http://www.kahrel.plus.com/indesign/batch_convert.html
Does anyone know of a solution (paid or otherwise) for this process? Opening up each Book and exporting to PDF from the ID menu takes quite a bit of time when doing this for several dozen files.
Looking forward to any discussion to come up with a solution if one can be found... Mr. Kahrel's javascript file is a binary js file, so it can't be modified as is, and other solutions I've found around the web don't clearly state that they work with Book files or not.try below code
before run script close all indb file
var fileFilters = "InDesign:*.indb*";
var myFolder = Folder.selectDialog ("choose Folder", fileFilters, false);
var files = myFolder.getFiles("*.indb");
for(i = 0; i < files.length; i++)
var theDocument = app.open(File(files[i]), true);
with ( theDocument ) {
alert ( theDocument.name)
exportPdf(theDocument)
function exportPdf(theDocument)
myFilePath = myFolder + "/" + theDocument.name + "_" + ".pdf";
myFile = new File(myFilePath);
theDocument.exportFile(ExportFormat.pdfType, myFile, false, app.pdfExportPresets.item('[Smallest File Size]'));
theDocument.close(SaveOptions.no) -
How to export multiples pages in one PDF file?
I understand i can export image to a PDF file format.
Is there a way to export a few pages in a single PDF file?Another method:
http://forums.adobe.com/message/4506582#4506582 -
Can I use preview to export multiple page PDF as jpegs?
Using Preview, I export multiple page PDF as jpeg and results are the first page only as jpeg. Can I use preview to export multiple page PDF as jpeg for every page?
Automator is great for this if you need to export many pages to JPG, or just have to do this often.
Two other quick and dirty way sto get it done:
(1) Enable thumbnail view, click on the ONE PAGE you want to convert to jpg, then choose "export." If you choose more than one page, only the first will get exported to jpg.
(2) Create a copy of the file, delete all the pages except the one you want to export to JPG, and export that page. You may be able to "undo" the delete, get all your pages back again, and re-delete all but the one you want to export, etc. I would not recommend doing this on the original version of the file because of Preview's autosave so-called "feature." -
How to export multiple indd files to individual PDF's?
Is there a way without using scripting, to simply take, say 10 single indesign files (all just single 3.5x2 business card layouts) and export them to a pre-defined PDF preset resulting in 10 single PDF's? (other than one at a time?)
I tried a few things from Acrobat 9 pro, one of them being File/export/export multiple files/ thinking that must be the ticket, but
1) I can't find my pre-defined PDF preset in the "export to dropdown list" (but thats secondary, probably can add that in somehow, right?) and
2) even when I just pick PDF/a or PDF/x it starts the process, then tries to open each indd doc but a message comes up saying it can't open the INDD file(s) and nothing was processed.
Can someone help me with this?
Thank you.Macinbytes,
Would you mind walking me through what you are doing?
In your screen shot, that window looks like the preferences panel, in which you can set your PDF preset, correct?
Here's what I have been trying.
File/Create PDF/Batch Create Multiple files.
Eventually, I get this window. (output options)
Then when I hit OK, I get this error message saying the files cannot be opened. -
How to i write a script that makes multiple selections in a pdf and exports them to excel?
I have a large number of PDFs
Not all the PDFs contain information we need. We want to be able to automate a script that extracts certain info from the PDFs and opens them in a certain format in excel.
Acrobat allows me to make a single selection and export as excel.
How do i export multiple parts to excel from the pdfs and ensure that the resulting excel is in a format that i can use without much fixing needed (e.g. merged cells)?This type of process can't really be done using JavaScript. You would need to read the contents of the file, word by word, decide (based on some logic) what data to extract, and then collect it and at the end export to a plain-text file. Not a simple process...
-
Export multiple responses in pdf form?
Is it possible to export multiple responses into pdf form, not just excel? Thanks!
Sorry we currently do not support this. You can vote for the feature here:
http://forums.adobe.com/ideas/1378
We use this to help prioritize our work.
Thanks,
Randy -
Acrobat X Pro - Export multiple PDFs to JPG
In Acrobat 9 Pro I am able to export multiple pdfs to jpg using file--->export multiple.... In Acrobat X I can't seem to find this funtionality. Any ideas?
Thanks.I tried this script and it did work but I needed to export to PNG rather than JPG. I could not see a way to do that without actual scripting, which I don't know how to do. So I opened the script linked here in Textpad and just changed "jpg" to "png" and it worked - happy day for me! If anyone would like to download this action, you can find it here: http://ccl.rutgers.edu/~lindaeve/acrobatx/Export_to_PNG.sequ
Linda -
Export multiple response entries to combine PDF.
Is it possible to export multiple response entries into a singe multi-page (combined PDF? This can be done externally using Adobe Acrobat Pro, but it would be extremely useful for distributing responses to clients especially since some cannot access the responses through mobile devices such as IPAD.
Sorry, we currently don't support this. You have to export them one at a time.
-
How to Export multiple photos from pdf files?.
Good day.
How to Export multiple photos from pdf files?.
Thanks.Hello
how to reach from file menu ?.
Running Adobe reader 9 version 9.3.0
Thanks again. -
Need help exporting multiple individual PDF files out of Indesign CC
I work for a monthly publication and we send our files to the press at the end of the month. There are around 190+ pages that need to be exported as individual PDF's and each PDF needs to be labled as their correct page number. Since we often are backed up against the wall at our deadline, we really need a way to export all these files at one time. Is there a way to export multiple PDF files at one time in Indesign CC?
You could script InDesign to export each page as individual PDF with specific export presets and labeled with correct page number.
But you could also use Acrobat Pro for this task (sorry for the certainly wrong translation of the Acrobat UI – I use a german version ...):
Export the whole publication as 1 PDF file (pp. 1-190).
Open it in Acrobat Pro and choose »Tools › Extract Pages«.
Type 1 to 190 and check the box »extract pages as single pages«, choose the location where to extract to and acrobat automatically numbers your new PDFs sequentially from 1 to x. (Caution: it doesn’t take the correct page number, but numbers sequentially, so it is important to have a PDF from pp. 1-190 in the correct order.)
So with this (as mentioned – sorry for German ):
You’ll get this:
Tobias -
How To Export Windows Forms Multiple DataGridViews in single PDF using iTextSharp, C#
Hi,
I am using VS2010 For my windows application dash board is required for that i am using 6 datagridview to display in form and i want to export all datagridviews to one single pdf please help me out.
How To Export Windows Forms Multiple DataGridViews in single PDF using iTextSharp, C#
Thanks in advanceHi friend,
Actually iText is a third party library to create PDF originally written for java. iTextSharp is the C# adaptation of that library.
Question regarding iText are better asked on the iText forum, but this is Microsoft Forum:
http://itextpdf.com/support
But I am found a similar thread, it may help you.
http://www.codeproject.com/Questions/442171/How-to-convert-datagridview-to-pdf-in-csharp
Have a nice day!
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Sending ALV output in a mail in PDF format
Hi folks,
I have a requiremtnt. If i execute my ALV report in background, the output should be sent to the reciepient's mail in pdf format. i have used the function moudles CONVERT_ABAPSPOOLJOB_2_PDF and SO_DOCUMENT_SEND_API1. Now i am able to see my report output in spool in some pdf formt. how can i send this to the reciever mail as an attachement...pls send me any sample report which suits my reqirement...thanks in advance,
Ram.REPORT ZSAP_EMAIL MESSAGE-ID Z001.
*TABLES: rlgrap, btcxpm." zlookup.
DATA:
V_ZCODE(3) TYPE C,
*svrname LIKE zlookup-zdesc,
WA_ERROR(80) TYPE C,
GLOBAL_FILEMASK_ALL(80).
DATA: T_SOUD LIKE SOUD.
DATA: P_INFOLDER LIKE SOFDK.
DATA: P_OUTFOLDER LIKE SOFDK.
DATA: OBJECT_HD_DISPLAY LIKE SOOD2.
DATA: OBJECT_ID LIKE SOODK.
DATA: DOCUMENT LIKE SOOD4.
DATA: HEADER_DATA LIKE SOOD2.
DATA: LINK_FOLDER_ID LIKE SOODK.
DATA: FOLDER_SELECTIONS LIKE SOFDS.
DATA: FOLDER_LIST LIKE SOXLI OCCURS 0 WITH HEADER LINE.
DATA: RECEIVERS LIKE SOOS1 OCCURS 0 WITH HEADER LINE.
DATA: OBJCONT LIKE SOLI OCCURS 0 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLI OCCURS 0 WITH HEADER LINE.
DATA: OBJECT_CONTENT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
DATA: OBJECT_HD_CHANGE LIKE SOOD1.
DATA: BEGIN OF FILES OCCURS 0,
LINE(200) TYPE C,
END OF FILES.
DATA: LISTOBJECT LIKE ABAPLIST OCCURS 1 WITH HEADER LINE.
*Email to addresses
SELECTION-SCREEN: BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1.
PARAMETERS: P_MAILTO(240) TYPE C.
*PARAMETERS:P_MAILTO TYPE SOLI-LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN COMMENT 10(2) TEXT-001.
*Use zlookup-ztype as group to define multiple email to addresses
*SELECT-OPTIONS: s_mailto FOR zlookup-ztype.
SELECTION-SCREEN: END OF BLOCK BL1.
*Subject
SELECTION-SCREEN: BEGIN OF BLOCK BL2 WITH FRAME TITLE TEXT-BL2.
PARAMETERS: P_SUBJ LIKE DOCUMENT-OBJDES.
SELECTION-SCREEN: END OF BLOCK BL2.
*Body
SELECTION-SCREEN: BEGIN OF BLOCK BL3 WITH FRAME TITLE TEXT-BL3.
PARAMETERS: P_BODY1 LIKE SOLISTI1-LINE LOWER CASE.
PARAMETERS: P_BODY2 LIKE SOLISTI1-LINE LOWER CASE.
PARAMETERS: P_BODY3 LIKE SOLISTI1-LINE LOWER CASE.
PARAMETERS: P_BODY4 LIKE SOLISTI1-LINE LOWER CASE.
PARAMETERS: P_BODY5 LIKE SOLISTI1-LINE LOWER CASE.
PARAMETERS: P_BODY6 LIKE SOLISTI1-LINE LOWER CASE.
SELECTION-SCREEN: END OF BLOCK BL3.
*Attachments
SELECTION-SCREEN: BEGIN OF BLOCK BL4 WITH FRAME TITLE TEXT-BL4.
PARAMETERS: P_FNAME1 LIKE FILES-LINE.
PARAMETERS: P_FNAME2 LIKE FILES-LINE.
PARAMETERS: P_FNAME3 LIKE FILES-LINE.
PARAMETERS: P_FNAME4 LIKE FILES-LINE.
PARAMETERS: P_FNAME5 LIKE FILES-LINE.
PARAMETERS: P_FNAME6 LIKE FILES-LINE.
SELECTION-SCREEN: END OF BLOCK BL4.
AT SELECTION-SCREEN.
PERFORM CHK_SELECTION.
IF NOT WA_ERROR IS INITIAL.
MESSAGE E001 WITH WA_ERROR.
ENDIF.
START-OF-SELECTION.
END-OF-SELECTION.
PERFORM SEND_EMAIL.
FORM chk_selection
FORM CHK_SELECTION.
CLEAR WA_ERROR.
*Loop only once ???
*If more checkings to be done.
*Think about it and if not clear.
*Let it sink in for a couple of minutes.
*Still doesn't make sence? Go home and sleep on it.
DO 1 TIMES.
*Check Email to
IF P_MAILTO IS INITIAL .
*AND s_mailto IS INITIAL.
WA_ERROR = 'Invalid or no EMAIL TO selection'.
EXIT.
ENDIF.
ENDDO.
ENDFORM. "chk_selection
*& Form send_email
*text
*--> p1 text
*<-- p2 text
FORM SEND_EMAIL.
PERFORM GET_FOLDER_INFO.
PERFORM FILL_BODY.
PERFORM INS_NEW_OBJECT.
PERFORM CRT_ATTACHMENTS.
PERFORM FILL_RECEIVERS_INFO.
PERFORM SND_EMAIL.
ENDFORM. " send_email
*--+--
*FORM Get_folder_info
FORM GET_FOLDER_INFO.
CLEAR T_SOUD.
*Small so should be quick.
SELECT * FROM SOUD
INTO T_SOUD
WHERE SAPNAM = SY-UNAME.
P_INFOLDER-FOLTP = 'FOL'.
P_INFOLDER-FOLYR = T_SOUD-INBYR. "inbox
P_INFOLDER-FOLNO = T_SOUD-INBNO.
P_OUTFOLDER-FOLTP = 'FOL'.
P_OUTFOLDER-FOLYR = T_SOUD-OUTYR. "outbox
P_OUTFOLDER-FOLNO = T_SOUD-OUTNO.
ENDSELECT.
ENDFORM. "get_folder_info
*FORM fill_body *
FORM FILL_BODY.
OBJECT_CONTENT-LINE = P_BODY1.
APPEND OBJECT_CONTENT.
OBJECT_CONTENT-LINE = P_BODY2.
APPEND OBJECT_CONTENT.
OBJECT_CONTENT-LINE = P_BODY3.
APPEND OBJECT_CONTENT.
OBJECT_CONTENT-LINE = P_BODY4.
APPEND OBJECT_CONTENT.
OBJECT_CONTENT-LINE = P_BODY5.
APPEND OBJECT_CONTENT.
OBJECT_CONTENT-LINE = P_BODY6.
APPEND OBJECT_CONTENT.
ENDFORM. "fill_body
*FORM ins_new_object *
FORM INS_NEW_OBJECT.
OBJECT_HD_CHANGE-OBJNAM = 'Notes'.
OBJECT_HD_CHANGE-OBJDES = P_SUBJ.
CALL FUNCTION 'SO_OBJECT_INSERT'
EXPORTING
FOLDER_ID = P_OUTFOLDER
OBJECT_HD_CHANGE = OBJECT_HD_CHANGE
OBJECT_TYPE = 'RAW'
OWNER = SY-UNAME
IMPORTING
OBJECT_HD_DISPLAY = OBJECT_HD_DISPLAY
OBJECT_ID = OBJECT_ID
TABLES
OBJCONT = OBJECT_CONTENT
OBJHEAD = OBJHEAD
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
DL_NAME_EXIST = 4
FOLDER_NOT_EXIST = 5
FOLDER_NO_AUTHORIZATION = 6
OBJECT_TYPE_NOT_EXIST = 7
OPERATION_NO_AUTHORIZATION = 8
OWNER_NOT_EXIST = 9
PARAMETER_ERROR = 10
SUBSTITUTE_NOT_ACTIVE = 11
SUBSTITUTE_NOT_DEFINED = 12
SYSTEM_FAILURE = 13
X_ERROR = 14
OTHERS = 15.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "ins_new_object
*FORM crt_attachments *
*--> P_SUBJ *
FORM CRT_ATTACHMENTS.
DOCUMENT-FOLTP = P_OUTFOLDER-FOLTP.
DOCUMENT-FOLYR = P_OUTFOLDER-FOLYR.
DOCUMENT-FOLNO = P_OUTFOLDER-FOLNO.
DOCUMENT-OBJTP = OBJECT_ID-OBJTP.
DOCUMENT-OBJYR = OBJECT_ID-OBJYR.
DOCUMENT-OBJNO = OBJECT_ID-OBJNO.
DOCUMENT-OBJNAM = 'Notes'.
DOCUMENT-OBJDES = P_SUBJ.
DOCUMENT-OKCODE = 'CHNG'.
DOCUMENT-FILE_EXT = 'TXT'.
LINK_FOLDER_ID = OBJECT_ID.
HEADER_DATA-OBJLA = 'EN'.
HEADER_DATA-OBJNAM = DOCUMENT-OBJNAM.
HEADER_DATA-OBJDES = DOCUMENT-OBJDES.
HEADER_DATA-OBJPRI = '5'.
HEADER_DATA-OBJSNS = 'O'.
HEADER_DATA-FILE_EXT = 'TXT'.
REFRESH FILES.
CLEAR FILES.
IF NOT P_FNAME1 IS INITIAL.
FILES-LINE = P_FNAME1.
APPEND FILES.
ENDIF.
IF NOT P_FNAME2 IS INITIAL.
FILES-LINE = P_FNAME2.
APPEND FILES.
ENDIF.
IF NOT P_FNAME3 IS INITIAL.
FILES-LINE = P_FNAME3.
APPEND FILES.
ENDIF.
IF NOT P_FNAME4 IS INITIAL.
FILES-LINE = P_FNAME4.
APPEND FILES.
ENDIF.
IF NOT P_FNAME5 IS INITIAL.
FILES-LINE = P_FNAME5.
APPEND FILES.
ENDIF.
IF NOT P_FNAME6 IS INITIAL.
FILES-LINE = P_FNAME6.
APPEND FILES.
ENDIF.
IF NOT FILES[] IS INITIAL.
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
METHOD = 'ATTCREATEFROMPC'
TABLES
FILES = FILES
CHANGING
DOCUMENT = DOCUMENT
HEADER_DATA = HEADER_DATA.
IF SY-SUBRC = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. "crt_attachments
*FORM fill_receivers_info *
FORM FILL_RECEIVERS_INFO.
DATA: BEGIN OF RECLIST OCCURS 0,
REC LIKE RECEIVERS-RECEXTNAM,
END OF RECLIST.
*Build reclist
REFRESH RECLIST.
IF NOT P_MAILTO IS INITIAL.
RECLIST-REC = P_MAILTO.
APPEND RECLIST.
ENDIF.
*IF NOT s_mailto IS INITIAL.
*SELECT zdesc
*INTO reclist-rec
*FROM zlookup
*WHERE ztype IN s_mailto.
*APPEND reclist.
*ENDSELECT.
*ENDIF.
REFRESH RECEIVERS.
LOOP AT RECLIST.
FOLDER_SELECTIONS-FOLNAM = 'INBOX'.
CALL FUNCTION 'SO_FOLDER_LIST_READ'
EXPORTING
FOLDER_SELECTIONS = FOLDER_SELECTIONS
OWNER = SY-UNAME
REGION = 'P'
TABLES
FOLDER_LIST = FOLDER_LIST
EXCEPTIONS
COMPONENT_NOT_AVAILABLE = 1
OPERATION_NO_AUTHORIZATION = 2
OWNER_NOT_EXIST = 3
PARAMETER_ERROR = 4
X_ERROR = 5
OTHERS = 6.
IF SY-SUBRC = 0.
CLEAR RECEIVERS.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
P_MAILTO TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX.
APPEND RECEIVERS.
RECEIVERS-RCDAT = SY-DATUM.
RECEIVERS-RCTIM = SY-UZEIT.
RECEIVERS-RECNAM = RECLIST-REC.
RECEIVERS-RECNO = FOLDER_LIST-PARNO.
RECEIVERS-RECTP = FOLDER_LIST-PARTP.
RECEIVERS-RECYR = FOLDER_LIST-PARYR.
RECEIVERS-SNDTP = FOLDER_LIST-PARTP.
RECEIVERS-SNDYR = FOLDER_LIST-PARYR.
RECEIVERS-SNDNO = FOLDER_LIST-PARNO.
RECEIVERS-SNDNAM = SY-UNAME.
RECEIVERS-SNDPRI = '1'.
RECEIVERS-MSGID = 'SO'.
RECEIVERS-MSGNO = '619'.
RECEIVERS-DELIVER = 'X'.
RECEIVERS-NOT_DELI = 'X'.
RECEIVERS-READ = 'X'.
RECEIVERS-MAILSTATUS = 'E'.
**receivers-ADR_NAME
RECEIVERS-RESEND = ' '.
RECEIVERS-SORTFIELD = ' '. "'USER WF_BATCH INDIGO BATCH'.
RECEIVERS-SORTCLASS = '5'.
APPEND RECEIVERS.
ELSE.
CLEAR RECEIVERS.
RECEIVERS-SEL = 'X'.
RECEIVERS-RECESC = 'U'.
RECEIVERS-RECNAM = 'U-'.
RECEIVERS-RECEXTNAM = RECLIST-REC.
RECEIVERS-DELIVER = 'X'.
RECEIVERS-NOT_DELI = 'X'.
RECEIVERS-READ = 'X'.
RECEIVERS-MAILSTATUS = 'E'.
RECEIVERS-ADR_NAME = RECLIST-REC.
RECEIVERS-SORTFIELD = RECLIST-REC.
RECEIVERS-SORTCLASS = '5'.
APPEND RECEIVERS.
ENDIF.
ENDLOOP.
ENDFORM. "fill_receivers_info
*FORM snd_email *
FORM SND_EMAIL.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
FOLDER_ID = P_OUTFOLDER
OBJECT_ID = OBJECT_ID
OUTBOX_FLAG = 'X'
OWNER = SY-UNAME
CHECK_SEND_AUTHORITY = 'X'
ORIGINATOR_TYPE = 'J'
LINK_FOLDER_ID = LINK_FOLDER_ID
TABLES
OBJCONT = OBJECT_CONTENT
RECEIVERS = RECEIVERS
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
ORIGINATOR_NOT_EXIST = 20
X_ERROR = 21
OTHERS = 22.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "snd_email
go through this.
Thanks -
Problem with Multiple Page convert in PDF
Hi all,
I done one invoice printing and convert in pdf report. but with smartform i get all thing and giving perfect out put.
But when i give second option for direct create a file of PDF this time only one page can convert in PDF. Means when i give multiple input like print invoice 0000910 to 0000925 so this time only invoice no. 0000925 is convert in pdf. But actually i need all invoice like 910 to 925 convert in one PDF with 25 pages.
And i done coding which is show below for this issue.
so please help me out and kindly guide me what is the mistake in my below code for make multiple page in one pdf.
FORM get_FORM1.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form_name
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmodule
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box
" for print preview
w_cparam-getotf = 'X'.
* Printer name to be used is provided in the export parameter
* OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ITABz[] = itab[].
ITABz1[] = itab1[].
IT_ADDRESSz[] = it_address[].
LOOP at itab1.
delete ITABz where vbeln ne itab1-vbeln.
delete ITABz1 where vbeln ne itab1-vbeln.
delete it_addressz where KUNNR ne itab1-KUNRG.
* delete itab1 where vbeln ne itab1-vbeln.
TOTAL_QNT = ITAB1-TOTAL_QNT.
TOTAL_AMT = itab1-TOTAL_AMT.
I_FKIMG = itab1-I_FKIMG.
BILL_DATE = itab1-BILL_DATE.
IJ_1ICSTNO = itab1-IJ_1ICSTNO.
VECHICAL_NO = itab1-VECHICAL_NO.
TAX = itab1-TAX.
INV_TXT = ITAB1-INV_TXT.
inv_name = ITAB1-INV_NAME.
INVOICE = ITAB1-INVOICE.
TAX1 = itab1-TAX1.
TAX_VAL = itab1-TAX_VAL.
TAX_ADD_VAL = itab1-TAX_ADD_VAL .
Text_inv = itab1-Text_inv.
TEXT1 = itab1-TEXT1.
TEXT2 = itab1-TEXT2.
TEXT3 = itab1-TEXT3.
TEXT4 = itab1-TEXT4.
TEXT5 = itab1-TEXT5.
P_DOCNO = itab1-vbeln.
CALL FUNCTION w_fmodule
EXPORTING
WERKS = WERKS
TOTAL_QNT = TOTAL_QNT
TOTAL_AMT = TOTAL_AMT
I_FKIMG = I_FKIMG
STATE = STATE
LAND1 = LAND1
LANDX = LANDX
P_DOCNO = P_DOCNO
BILL_DATE = BILL_DATE
IJ_1ICSTNO = IJ_1ICSTNO
T_WERKS = T_WERKS
VECHICAL_NO = VECHICAL_NO
TAX = TAX
TAX1 = TAX1
TAX_VAL = TAX_VAL
TAX_ADD_VAL = TAX_ADD_VAL
inv_txt = inv_txt
inv_name = inv_name
INVOICE = INVOICE
Text_inv = Text_inv
TEXT1 = TEXT1
TEXT2 = TEXT2
TEXT3 = TEXT3
TEXT4 = TEXT4
TEXT5 = TEXT5
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = w_cparam
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = w_outoptions
* USER_SETTINGS = 'X'
IMPORTING
* DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
* JOB_OUTPUT_OPTIONS =
TABLES
ITAB = itabz
ITAB1 = itabz1
IT_ADDRESS = it_addressz
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
iF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ITABz[] = itab[].
ITABz1[] = itab1[].
IT_ADDRESSz[] = it_address[].
ENDLOOP.
t_otf[] = t_otf_from_fm-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
* ARCHIVE_INDEX = ' '
* COPYNUMBER = 0
* ASCII_BIDI_VIS2LOG = ' '
* PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = W_bin_filesize
* BIN_FILE =
TABLES
otf = T_OTF
lines = T_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* To display File SAVE dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = w_FILE_NAME
path = w_FILE_PATH
fullpath = w_FULL_PATH
* USER_ACTION =
* FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
* presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
tables
data_tab = T_pdf_tab
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
EndFORM . "get_FORM1
thanks
Keyur
Edited by: keyur chauhan on Aug 30, 2010 11:56 AM
Edited by: keyur chauhan on Aug 30, 2010 11:57 AM
Edited by: keyur chauhan on Aug 30, 2010 12:37 PMThank you!
Unfortunately I didn't find any work around.
Thanks,
Federico -
How to merge multiple spools in one PDF
hi all,
i have a requirement to merge multiple spools into one PDF.
I have the code to merge 2 spools into one PDF but acc to my requirement this number can be any( say 100). hence i need help to merge N number of spools in one PDF.
Regards
geeta guptaTake the data of all spools into a internal table then create a new spool with this data then downlad this data into pdf format.
By this method you can download any number of spools into a single pdf file. Please see the below code
Fetch spool number
Select rqident from tsp01 into table g_t_data
where...............
Read sool data and take this data into a internal table
Loop at g_t_data.
Call program to read spool as follows
SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
WITH rqident = g_t_data-rqident
WITH first = '1'
Read memory where spool data is stored
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = mem_tab
Convert spool data to Ascii
IF NOT mem_tab[] IS INITIAL.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = g_t_text1(table type c length 10000)
listobject = mem_tab(LIKE TABLE OF abaplist)
APPEND LINES OF g_t_text1 TO g_t_text.
ENDIF.
ENDLOOP.
Create new spool with internal table data
NEW-PAGE PRINT ON
KEEP IN SPOOL l_keep(variable type c default u2018Xu2019)
LINE-SIZE 300
LIST NAME l_list (variable(30) TYPE c default 'combined_pdf')
NO DIALOG.
LOOP AT g_t_text.
WRITE: g_t_text-data.
ENDLOOP.
NEW-PAGE PRINT OFF.
COMMIT WORK.
Fetch this spool number from TSP01
SELECT rqident rqcretime FROM tsp01 INTO TABLE l_t_pdf(internal table having two fields rqident LIKE tsp01-rqident and rqcretime LIKE tsp01-rqcretime)
WHERE rqowner = sy-uname AND
rq2name = 'COMBINED_PDF'.
Download spool data into pdf format
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = l_t_pdf-rqident
IMPORTING
pdf_bytecount = l_size(variable type i)
TABLES
pdf = g_pdf(table like table of tline)
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = l_size "size
filename = l_data
filetype = 'BIN'
TABLES
data_tab = g_pdf.
Hope this will help you.
Maybe you are looking for
-
How can I create a new itunes account?
I bought an ipod touch for my kid and I linked it to my itunes account. I changed my mind, How can I change this and make an itunes account for my kid?
-
Class not found...applet
Hi all, I am trying to load applet from remote machine, the applet giving the Class not found even though the is proper path setting. It also giving the error.. open http connection failed... Wating for reply. Sandeep Kutwal.
-
Unable to view TIFF image in BSP page
Hi , I have put in the URL of a TIFF image in the BSP code to display the image but the image refuses to appear. I found out that a TIFF image does not appear even in a normal HTML page. Is there any way to make this possible.
-
Opening email files in iOS 8.0.2
Files I have always used routinely on my iPad now, having updated to iOS 8.0.2, won't open from emails into QuickOffice. is this a known issue and does anyone have a solution?
-
Import speeds suddenly slowed down
I was using Lightroom 4.4 Windows 64bit this morning to import photos. I'd set off two batches of a hundered or so, one after the other and they both ran fne. I then switched to a different cataog, about 12000 files smaller, and tried to set off anot