Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / May 2005

Tip: Looking for answers? Try searching our database.

Print and Save using a Button Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mdsmitty - 19 May 2005 21:24 GMT
I need to have a button control print and save...can anyone tell me how to do
this.
Alex [MSFT] - 20 May 2005 06:23 GMT
You need to write custom code to make that work. Download the InfoPath
SDK, and the Developer Reference (in particular Object Model reference)
will help you.

Good luck,
Alex @ Microsoft

-----Original Message-----
From: mdsmitty [mailto:mdsmitty@discussions.microsoft.com]
Posted At: Thursday, May 19, 2005 1:25 PM
Posted To: microsoft.public.infopath
Conversation: Print and Save using a Button Control
Subject: Print and Save using a Button Control

I need to have a button control print and save...can anyone tell me how
to do
this.
Greg Collins [InfoPath MVP] - 20 May 2005 20:21 GMT
Both of these functions will require your form to be set to Full Trust security.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

I need to have a button control print and save...can anyone tell me how to do
this.
RickH - 21 May 2005 01:58 GMT
thisXDocument.PrintOut()
thisXDocument.Save()    'or SaveAs
You need Full trust
If you are doing this for a business, you need to code sign your form before
publishing it, for everything to work smoothly for Full trust forms.....

> I need to have a button control print and save...can anyone tell me how to do
> this.
mdsmitty - 24 May 2005 19:51 GMT
I am able to get the Print to work but I get errors when the form is being
saved.  I seperated the bottons...one is Print and the other is Save.  The
Save button will not work, here is the code I have attempted.  I tried this
"thisXDocument.Save()" but
the following error occurred:

Object required: 'thisXDocument'
File:script.vbs
Line:36

This is my current code which is not working either.
Sub CTRL14_7_OnClick(eventObj)
XDocument.SaveAs
End Sub

>  thisXDocument.PrintOut()
> thisXDocument.Save()    'or SaveAs
[quoted text clipped - 4 lines]
> > I need to have a button control print and save...can anyone tell me how to do
> > this.
Greg Collins [InfoPath MVP] - 25 May 2005 23:08 GMT
"thisXDocument" is if you are using managed code (C#.NET or VB.NET). Since you are using script, you would use "XDocument" instead.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

I am able to get the Print to work but I get errors when the form is being
saved.  I seperated the bottons...one is Print and the other is Save.  The
Save button will not work, here is the code I have attempted.  I tried this
"thisXDocument.Save()" but
the following error occurred:

Object required: 'thisXDocument'
File:script.vbs
Line:36

This is my current code which is not working either.
Sub CTRL14_7_OnClick(eventObj)
XDocument.SaveAs
End Sub

"RickH" wrote:

>  thisXDocument.PrintOut()
> thisXDocument.Save()    'or SaveAs
[quoted text clipped - 6 lines]
> > I need to have a button control print and save...can anyone tell me how to do
> > this.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.