I have set up a rule to quite simply print out an email when received from a certain address (Amazon sales) - The idea being that as orders come in, they are auto printed and waiting to be packed.
However the amazon emails require 2 pages.
under the Rules menu in Outlook, the option is simply "Print" but no further print preferences are available.
Is there a way to get it to print the first page only? a script possibly?
No, Outlook Object Model does not porvide any fine controls over the print functionality. As a workaround, you can export the message as a DOC file (MailItem.saveAs), then programmatically load it in Word and use the Word Obejct Model to print it.
Related
I am trying to find the correct template and id to use for a hotprint of an advanced pdf template of an Item Fulfillment.
The hot print url is (with the id bolded) https://system.na3.netsuite.com/app/accounting/print/hotprint.nl?regular=T&sethotprinter=T&id=7600&label=Packing%20Slip&printtype=packingslip&trantype=itemship&orgtrantype=TrnfrOrd&auxtrans=7605
For some reason only certain id=# seems to affect the outcome and the ids I have got to work for two different templates don't match the Custom Transaction Forms ID or the Advanced pdf script id. (example most ids=template 1, while 168,4954, and seemingly random other ids=template 2) I am very confused on how netsuite resolves the hot print url as it normally doesn't include the template= part though I have seen others use it for invoice print urls.
The parameters at the end of the url (the stuff after the ?) are used by Netsuite to control settings used by the webpage which prints the PDFs for you.
In this case, &id=##### refers to the internal id of the document you are printing. You can see this by going to the document, right clicking, selecting inspect, and typing nlapiGetRecordId() into the console. When you click Print, you should see that same number after &id=#####.
&template=### refers to the template you are printing. If you go to Customization -> Forms -> Advanced PDF/HTML Templates, you'll notice a Script ID field in the table. If you substitute the correct Script ID in for the number in &template=###, you'll notice you generate the same PDF. This Script ID acts the same as the number that was previously there.
The reason you're seeing unusual results when you change those numbers is because you're mismatching a record with a template not built for it. So it won't print exactly right, but will sometimes execute anyways.
Anyways, this sort of parameter scheme is a similar scheme to how Suitelets and Restlets work, so in the future, you might experience this sort of thing again.
EDIT: For those reading this in the future, please read the comments.
To customize a packing slip and return form:
If you are printing packing slips and need some customization, you can use a custom invoice form when printing packing slips. For example, you can customize an invoice form to hide the fulfilled item tax rate and amount, and the order total. Then, when you print the packing slip using the custom form through mass print, choose the the packing slip shows the customized information.
I'm managing a Filemaker Pro 12 solution to create purchase orders and send them via email for the iPad but the iOS Platform doesn't allow to export Excel files.
Currently we are sending the orders as a .pdf file but the warehouse has to manually approve each order. The solution we were thinking of is to send a .csv file attached to an email so that the warehouse has less work.
I'm using 3 different tables to create a order. A table that stores the products, a container table (to set the quantity, discount etc.) and a table for the order itself. So you can for example create three product-A and two Product-B in an order which works fine. My PDF solution uses an extra Layout and works fine. On a PC or Mac you can export Excel files with a script and the "Save Records as Excel" function, but this is not available on iOS, so I'm looking for alternatives.
The script I came up with to send the .csv file via email looks like this:
Set Error Capture [On]
Freeze Window
Go to Related Record [Show only related records; From table "Orders_Container"; Using Layout: "MailLayout" (Orders_Container); New Window]
If( Get (LastError) = 0)
Sort Records[ Restore; No dialog]
Set Variable[ $FILE; Value:Get (TemporaryPath ) & "file.csv" ]
Export Records [No dialog; "$FILE"; Windows(ANSI)]
Send Mail[Send via E-mail Client; To: "customer#web.com"; Subject: "Order"; "$FILE"]
End If
Close Windows [Current Window]
I tried to use the function "Export Records" but it exports all records of the current customer instead of the 'Records being browsed' which is only available for the PDF export. I've tried to do this but on iOS you can't create a new file to export and I can't come up with something else. I don't want the users to use Menu -> Export -> E-Mail because they will have to enter 3-4 Email addresses each time which is way to time consuming (this also exports all records instead of the ones which are currently being browsed). Is there any way to export the records that are currently open, save those in a .csv file and send a mail with the file attached? Thanks in advance.
EDIT: Ironically after some testing with different scripts, the script I posted here works now correctly.
The Export Records function exports the current found set - the same as Records Being Browsed. This indicates that other issues are keeping your script from working.
You might want to look at the Related Record and which set is found. Use a temporarily pause just before the Import Records function is called to see what set is present.
Also, keep in mind that if there is an error with your Go to Related Record call, nothing happens. A record created by a previous export would then remain in place and this then might show a different set of records than you would expect.
I am trying to implement sort of mail merge for printed documents in Ruby on Rails 3.2. I have about 8000 recipients and template origin in Microsoft Word. Template includes images (photos) and contains about 10-20 pages.
Actual situation is, that I rewritten original template to Textile (redcloth) and pictures are inserted from internet (http address). I did all personalisation etc. So I generate HTML file and must divide it to many small files each for 1000 pages. Total I need print about 8000 x 20 pages = 160.000 pages.
Anyone know how to print it to PDF from HTML? Or how to insert commands for changing paper tray (for first and last page) or for binding after each 20 pages etc?
Thank you for any idea :-)
Here's one idea: in your rails app, set it up to return one html per user. Also, have a nice /users/ index method that returns a list of users in something convenient, maybe json format.
Now, you want a local script, written in ruby, bash, whatever is convenient, to:
fetch a list of users from that /users/ method, probably save it to a file
loop over the list of users (from the file, so they're not all in memory), and fetch the HTML of the email
generate pdf from each HTML downloaded, either inside the loop, or loop over files in a directory where you saved the HTML. Use wkhtmltopdf or similar.
send each pdf to the printer, again either inside the same loop, or loop over the saved pdf's.
If you wanted to get fancy, and a little more efficient, you could use a queueing system like resque, and make each of those bullet points into a queue, and run one worker per queue. That would let you start printing some pdfs while others were still being downloaded and converted, so it should be less time overall. But if you're not already familiar with a queuing system like that, a simple script should get it done as well.
I am Using Struts2 and Display Tag in my Application. And I am Using navigation with partial="true" option in display table.
I have an another requirement that there is print option. If the User clicks on Print icon, the whole content should send all the records irrespective of navigation.i mean all records. Is it possible to achieve this? If only records in the page means.No problem i can do this. How can i send all the records for the print?
I am developing the window application using C#. I am using the reportviewer to display rdlc. I just require following things:
1). Print rdlc without viewing it Client will click on print button and print should go System default printer.
2). if System default printer is not available/working then it will prompt for alternative.
i don't want to use xml file
Here is what you need to do is load your report and data into the report viewer and then render the report pages into list of memory streams and print them using then PrintDocument Class here as an expample how it is done link. For the part where it asks the user if it doesn't find default printer change
if (!printDoc.PrinterSettings.IsValid)
{
throw new Exception("Error: cannot find the default printer.");
}
in the Print()method with the showing of PrintDialog for user to select printer.