Printing with a button - InfoPath Dev Sign in | Join | Help in Code InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Code » Printing with a button Printing with a button Last post 09-02-2008 02:32 AM by Anuma. 5 replies. Page 1 of 1 (6 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 11-15-2005 05:27 AM [email protected] Joined on 10-19-2005 USA Posts 2 Printing with a button Reply Contact I am using Visual Basic to program the form. I have a row of buttons and I would like each one to print a different view then return to the main form. I can't get this working. Can anybody help with the VB code I'll switch to JavaScript if I need to, but I don't want to. 11-15-2005 06:28 AM In reply to franck Joined on 10-03-2005 USA Posts 310 Re: Printing with a button Mark as Not AnswerMark as Answer... Reply Contact Hi,You can use code to do this:To Switch View:thisXDocument.View.SwitchView("MyViewName")To print:thisXDocument.PrintOut()Regards,Franck Dauché 11-15-2005 07:04 AM In reply to [email protected] Joined on 10-19-2005 USA Posts 2 Re: Printing with a button Mark as Not AnswerMark as Answer... Reply Contact XDocument.View.SwitchView("MyViewName") works if I change it to XDocument it will not work as thisXDocument. The PrintOut part does not work no matter how I change the statement. 11-15-2005 07:24 AM In reply to franck Joined on 10-03-2005 USA Posts 310 Re: Printing with a button Mark as Not AnswerMark as Answer... Reply Contact Hi Jim,Then, what you are after is VBScript, not Visual Basic, right?In VBScript, it becomes: XDocument.PrintoutBut, your form needs to be fully trusted....else, you will get a permission denied error message.Regards,Franck Dauché 09-02-2008 02:26 AM In reply to testuser Joined on 05-16-2008 Posts 45 Re: Printing with a button Mark as Not AnswerMark as Answer... Reply Contact How can I change a form to a fully trusted form? 09-02-2008 02:32 AM In reply to Anuma Joined on 07-20-2005 India Posts 525 Re: Printing with a button Mark as Not AnswerMark as Answer... Reply Contact Hi, Please read the below given link.http://www.infopathdev.com/files/folders/misc/entry31650.aspx I hope this will help you. Anuma Chinthapalli /http://www.GGKTech.com Page 1 of 1 (6 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
How can I change a form to a fully trusted form?
Hi,