BN.com Gift Guide

Designing Forms for Microsoft Office InfoPath and Forms Services 2007 (Microsoft .NET Development Series)

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 96%)
Other sellers (Paperback)
  • All (22) from $1.99   
  • New (7) from $19.80   
  • Used (15) from $1.99   

Overview

"Microsoft Office InfoPath represents a revolutionary leap in XML technologies and a new paradigm for gathering business-critical information. I am delighted that Scott Roberts and Hagen Green, two distinguished members of the InfoPath product team, decided to share their experience in this book."

--From the Foreword by Jean Paoli, cocreator of XML 1.0 and Microsoft Office InfoPath

Microsoft Office InfoPath 2007 offers breakthrough tools for gathering, managing, and integrating business-critical information, and creating efficient forms-driven processes. Two longtime members of Microsoft's InfoPath product team have written the first comprehensive, hands-on guide to building successful XML-based solutions with InfoPath 2007.

The book opens with a practical primer on the fundamentals of InfoPath form template design for information workers and application developers at all levels of experience. It then moves into advanced techniques for customizing, integrating, and extending form templates--with all the code examples and detail needed by professional developers.

Learn how to:

  • Design form templates: create blank form templates, insert and customize controls, use advanced formatting, and construct and lay out views
  • Work with data: start with XML data or schema, manually edit data sources, and understand design-time visuals
  • Add custom business logic to forms, and integrate them with other applications
  • Retrieve and query data from external data sources, including XML files, databases, SharePoint lists, Web services, and ADO.NET DataSets
  • Submit and receive form data using ADO.NET
  • Save, preview, and publish to e-mail, SharePoint, and more
  • Build reusable components with template parts
  • Create workflows with SharePoint and InfoPath E-Mail Forms
  • Administer Forms Services and Web-enabled form templates
  • Build advanced form templates using C# form code, custom controls, add-ins, and the new InfoPath 2007 managed object model
  • Design form templates using Visual Studio Tools for Office (VSTO)
  • Update, secure, and optimize your form templates

List of Figures
List of Tables

Foreword

Preface

About the Authors

PART I: Designing Forms
Chapter 1: Introduction to InfoPath 2007
Chapter 2: Basics of InfoPath Form Design
Chapter 3: Working with Data
Chapter 4: Advanced Controls and Customization
Chapter 5: Adding Logic without Code
Chapter 6: Retrieving Data from External Sources
Chapter 7: Extended Features of Data Connections
Chapter 8: Submitting Form Data
Chapter 9: Saving and Publishing
Chapter 10: Building Reusable Components
Chapter 11: Security and Deployment
Chapter 12: Creating Reports
Chapter 13: Workflow
Chapter 14: Introduction to Forms Services
Part II: Advanced Form Design
Chapter 15: Writing Code in InfoPath
Chapter 16: Visual Studio Tools for Microsoft Office InfoPath 2007
Chapter 17: Advanced Forms Services
Chapter 18: Hosting InfoPath
Chapter 19: Building Custom Controls Using ActiveX Technologies
Chapter 20: Add-ins
Chapter 21: Importers and Exporters
Appendix: Further Reading
Index

Read More Show Less

Product Details

  • ISBN-13: 9780321410597
  • Publisher: Addison-Wesley
  • Publication date: 2/19/2007
  • Series: Microsoft .NET Development Series
  • Pages: 1223
  • Sales rank: 1,112,068
  • Product dimensions: 7.02 (w) x 9.25 (h) x 1.16 (d)

Meet the Author

Scott Roberts is a Senior Development Lead on the InfoPath team at Microsoft Corporation, and has been involved with InfoPath since its inception. He leads development on features ranging from controls and template parts to the Word/Excel importers. Scott is also the author of Programming Microsoft Internet Explorer 5 (Microsoft Press) and numerous technical articles and publications.

Hagen Green is a Software Design Engineer in Test II at Microsoft Corporation, and has been a member of the InfoPath team since its inception. He leads a team focused on the next version of Windows SharePoint Services. He contributed chapters on InfoPath to Visual Studio Tools for Office: Using Visual Basic 2005, and Visual Studio Tools for Office: Using C# (Addison-Wesley).

Read More Show Less

Read an Excerpt

It Just Makes Sense

Over the past ten years, Extensible Markup Language (

In addition, most organizations use forms in one way or another, whether to enter a purchase request, submit expense report information, or track weekly status. If you look at a typical form, you will notice that the form itself is structured unlike a typical freeform document created in an application such as Microsoft Office Word 2007. In these freeform documents you can type anything you like in any way that you choose. Although a form may contain sections that allow you to enter freeform text such as comments, most of your typical forms are highly structured. Fields in the form usually require you to enter specific types of data such as sales numbers or costs. Since

Since building forms based on

Developing forms applications in this way is not something that typical information workers can do. Usually this type of coding is reserved for advanced software developers. Another disadvantage of this approach is that different forms applications usually have different user interfaces. Each time a user fills out a form, he or she may need to learn a different set of commands and menu items. This learning curve costs the company time and money.

About five years ago, Microsoft recognized the need for a common tool to build forms based on

Looking at the wealth of features included in InfoPath, especially those added in InfoPath 2007, it also just made sense to create this book. This book is titled Designing Forms for Microsoft Office InfoPath and Forms Services 2007 for a reason. It's all about designing forms using InfoPath 2007, as we're sure you have figured out by now. This book will teach you everything you need to know about creating forms using InfoPath 2007 and probably a few things you never thought you needed to know.

Who Should Read This Book

Whether you are an information worker who has created only a few forms in Word or a software developer who is familiar with more advanced coding concepts, if your intention is to learn how to design InfoPath forms, this book is for you. This book will talk about not only the basics of designing forms but also such advanced concepts as writing managed code for InfoPath. As long as you have an understanding of basic form concepts and a desire to learn, you are in the right place. If you want to learn everything you can about InfoPath 2007, you have found the right book.

How This Book Is Organized

This book contains two parts. Part I is all about designing forms in InfoPath. No prior coding experience is required to understand the concepts, so both information workers and developers can use Part I to learn the basics of InfoPath form design. Many chapters build on previous chapters and become slightly more advanced as you progress. For example, in Chapter 4 we discuss advanced controls and customization, but by Chapter 6 we show how to pull external data, such as from a Web service, into your forms. By the time you finish reading Part I, you should know everything you need to know to design an InfoPath form for the InfoPath client application or for the browser without having to write any code.

Part II is about advanced form design. In this part of the book we talk about using more advanced form design techniques, including how to write code for InfoPath. These chapters are geared mainly toward software developers who have some basic coding experience. However, if you are an information worker and you have completed Part I of this book, the second part may interest you as well. In Part II, we talk about such topics as the InfoPath object model (Chapter 15), advanced topics regarding InfoPath Forms Services (Chapter 17), and ways to host InfoPath (Chapter 18).

Conventions Used in This Book

We use a few typographical conventions throughout this book. Bold text indicates key topics or terms. The names of features shown in the user interface, such as menu items, appear in italic text.

Information that pertains to InfoPath Forms Services is clearly displayed as features in the text. These tips will let you know when certain InfoPath features work differently in browser forms or don't work at all.

Samples Almost every chapter in this book has one or more samples, which you can download from the Addison-Wesley Web site for this book. Sometimes the samples are InfoPath form templates (.xsn) files, which is the case throughout Part I. In order to use these form templates, you first need to open them in InfoPath design mode and resave them to a local folder. (This will make more sense after you start reading Part I.) Trying to open the form template in order to fill it out without first saving it will result in an error. Some samples include form (.

Open dialog (i.e., click on the On My Computer link from the Getting Started dialog.) The first time you open one of the sample forms, the dialog shown in Figure P.1 will be displayed. This dialog allows you to choose the form template associated with the form you are trying to open. The text of the chapter indicates the correct form template to use. After you choose the form template, click the checkbox Always use this form template for this file. After the form is opened, immediately save it. This will prevent you from having to choose the form template each time you open the form. Some sample form templates define one or more data connections. For these samples to work properly, the external data source must exist. To see if a form template depends on a data connection, go to the Data Connections menu item under the Tools menu while in design mode. Since there are many types of data connections, we'll describe how to set up each one to successfully preview the form.

  • Resource Files menu item on the Tools menu), there is nothing you need to do. If the

    Modify button on the Data Connections dialog to point to your copy of the

  • Database: A database connection depends on a SQL Server or Access database. If the sample uses a SQL Server database, you must have SQL Server installed and have administrative rights to the SQL Server instance. For an Access database, the chapter will include an Access database (.mdb) file. For either case, click the Modify button on the Data Connections dialog to update the data connection to point to your database to restore the connection.
  • Web service: To use a Web service, you must have Internet Information Services (IIS) 6.0 or higher installed on your computer. The ASP.NET 2.0 ISAPI Web extension must be enabled, and ASP.NET should be configured to render .aspx pages. Copy the Web service code from the sample and paste it into a new ASP.NET Web service project in Visual Studio 2005. If you don't have Visual Studio, you can still create the Web service by creating a text file with extension .aspx within an IIS virtual directory. Check to see if the Web service code requires read or write access to specific directories; you can grant access to those directories or simply update the code to use directories of your choice. Before using the Web service with InfoPath, try navigating to the Web service by using a Web browser on the local machine. Once the Web service works outside of InfoPath, you can click the Modify button in the Data Connections dialog to change the Web service connection from the sample
  • SharePoint library or list: The prerequisite to using samples with a SharePoint library or list connection is a Microsoft Office SharePoint server. If you have a SharePoint server, ensure you have at least reader rights if the connection is only reading data. Likewise, if the sample form template submits to a SharePoint library, you must have contributor or higher privilege. Ensure the library or list upon which the form template depends actually exists on the server. To use your library or list, edit the connection to point to your server and select the appropriate library or list.

In Part II of this book, most of the samples include code. Those samples that require you to perform special actions (or actions in a specific order) to build the samples include ReadMe.txt files that explain what you need to do.

For sample form templates that include form code, you must do the following. First, find the sample form template (.xsn) and archive (.zip) files with the same name. Extract the archive to a location on your computer by right-clicking on the .zip file and selecting Extract All. Next, open the form template in design mode as you would for samples without form code. Select the Microsoft Visual Studio Tools for Applications (VSTA) menu item under Tools and then Programming. If InfoPath cannot find the VSTA project, the dialog shown in Figure P.2 appears. Click the Browse button to navigate to the Visual C# Project (.csproj) file within the extracted folder. Once the Microsoft Visual Studio Tools for Applications window appears, hit F5 to fill out the form while previewing it. The debugger will be automatically attached, so any breakpoints or unhandled exceptions halt form execution.

Some samples in Part II require references to the interop assemblies for InfoPath. In order to set a reference to the correct interop assemblies, open the Add Reference dialog in Visual Studio and browse to the install location for Microsoft Office 2007. (This is usually C:\Program Files\Microsoft Office\Office12.) Then, locate the ipeditor.dll file and select it. This will include the Microsoft.Office.Interop.InfoPath interop assembly that you need as well as a few assemblies that aren't needed. In order to be able to install the samples, you will need to remove the references to the ADODB, MSHTML, and MS

Some code snippets that you see within chapters may differ from the code in the sample. Due to space constraints, brevity in code may have resulted in reformatting or removal of comments or error-handling code that are not required to understand the sample. Regardless, the functionality of the code itself remains unaffected. Note that the code included with the sample form templates is not considered production quality. The code samples, not to mention the form templates themselves, have not been subjected to the rigorous testing you would expect from a company such as Microsoft.

Feedback

After you read this book, we would love to hear what you think about it—both positive and negative. This will help us improve future revisions. Also, feel free to send us any questions you may have. We would be happy to help. To contact us, simply send us an e-mail at DesigningIPForms@hotmail.com. If you have a question, either Scott or Hagen will reply as quickly as possible. We hope that you enjoy the book and that it makes the process of designing InfoPath form templates much easier.

Read More Show Less

Table of Contents

List of Figures xxi

List of Tables xlvii

Foreword li

Preface lv

About the Authors lxv

PART I: Designing Forms 1

Chapter 1: Introduction to InfoPath 2007 3

What Is InfoPath? 3

InfoPath 2003 7

InfoPath 2003 Service Pack 1 12

InfoPath 2007 17

What's Next? 24

Chapter 2: Basics of InfoPath Form Design 25

Getting Started 25

What Is a Form Template Anyway? 26

Design a Form Template Dialog 27

Creating a New Blank Form Template 30

Designing the Layout of Your Form 34

Using Controls 41

Creating Multiple Views 73

Advanced Formatting 76

What's Next? 83

Chapter 3: Working with Data 85

Getting Started 85

Data Binding 86

Data Source Field and Group Properties 95

Manually Editing the Data Source 110

Advanced Data Binding 137

Editing Default Template Data 151

What's Next? 154

Chapter 4: Advanced Controls and Customization 155

Getting Started 155

Advanced Controls 156

Control Properties 174

Advanced Customizations 204

What's Next? 213

Chapter 5: Adding Logic without Code 215

Getting Started 215

Conditional Formatting 215

Data Validation 222

Rules 229

Logic Inspector 235

What's Next? 240

Chapter 6: Retrieving Data from External Sources 241

Getting Started 241

Data Connections 242

XML Files 247

Databases 256

Web Services 273

SharePoint Libraries and Lists 292

What's Next? 296

Chapter 7: Extended Features of Data Connections 297

Getting Started 297

Extended Features of Web Services 298

Secondary Data Source Binding 307

Offline Mode Query Support 312

List Box Controls Connected to Secondary Data Sources 316

What's Next? 325

Chapter 8: Submitting Form Data 327

Getting Started 327

Why Submit? 328

Submitting Forms 334

ADO.NET DataSetSubmit 369

Submit Options 392

What's Next? 395

Chapter 9: Saving and Publishing 397

Getting Started 397

Saving and Publishing a Form Template with InfoPath 398

Saving Templates as Extracted Source Files 421

Previewing Form Templates 424

What's Next? 430

Chapter 10: Building Reusable Components 431

Getting Started 431

Designing a New Template Part 432

Using a Template Part 438

Updating Template Parts 447

Customizing Existing Template Parts 452

What's Next? 454

Chapter 11: Security and Deployment 455

Getting Started 455

Introduction to InfoPath Security 456

InfoPath Security Levels 458

Trust and Designer Lockdown 499

Digital Signatures 507

Information Rights Management 538

What's Next? 552

Chapter 12: Creating Reports 553

Getting Started 553

Merging Forms 554

Printing 586

Exporting Forms 605

What's Next? 612

Chapter 13: Workflow 613

Getting Started 613

User Roles 614

Workflow with Microsoft Office SharePoint

Server 2007 634

Workflow with InfoPath E-Mail Forms 643

What's Next? 663

Chapter 14: Introduction to Forms Services 665

Getting Started 665

What Is InfoPath in the Browser? 666

Installing and Configuring Forms Services 671

Publishing a Form Template to Forms Services 678 Getting Familiar with Browser Forms 682

Designing a Browser-Enabled Form Template 690

Getting Familiar with the Browser Form Experience 701 SharePoint Integration 705

Data Connections 710

Filling Out Browser Forms 714

Mobile Support: Smart Phone and PDA 720

What's Next? 726

Part II: Advanced Form Design 727

Chapter 15: Writing Code in InfoPath 729

Getting Started 729

Writing Code Behind a Form 730

The InfoPath Object Model 741

Programming InfoPath...in Action! 790

What's Next? 832

Chapter 16: Visual Studio Tools for Microsoft Office InfoPath 2007 833

Getting Started 833

What Is VSTO? 834

Bringing InfoPath into Visual Studio 835

Installing VSTO 836

Designing a Form Template with VSTO 836

Previewing a Form in VSTO 863

What's Next? 864

Chapter 17: Advanced Forms Services 865

Getting Started 865

Controls and Browser Optimizations 867

Form Code 875

SharePoint Integration 885

Data Connections 929

Performance Tips and Best Design Practices 950

What's Next? 963

Chapter 18: Hosting InfoPath 965

Getting Started 965

Hosting Scenarios 966

Document Information Panel 966

Creating an InfoPath Host Application 977

Hosting the InfoPath Form Control in a Web Browser 1011

What's Next? 1036

Chapter 19: Building Custom Controls Using ActiveX Technologies 1037

Getting Started 1037

Installing and Using ActiveX Controls 1038

Building Custom Controls for InfoPath Using ActiveX 1049

What's Next? 1072

Chapter 20: Add-ins 1073

Getting Started 1073

Introduction to COM Add-ins 1074

Building a COM Add-in for InfoPath 1076

Custom Task Panes 1093

Writing Add-ins and Custom Task Panes Using VSTO 2005 SE 1105

Managing InfoPath Add-ins 1111

What's Next? 1114

Chapter 21: Importers and Exporters 1115

Getting Started 1115

Built-in Form Importers 1116

Creating Your Own Form Importers and Exporters 1128

Importing Form Data 1142

What's Next? 1148

Appendix: Further Reading 1149

Index 1157

Read More Show Less

Preface

It Just Makes Sense

Over the past ten years, Extensible Markup Language (XML) has become more widely used than ever before as a means of transferring data between applications and even between organizations. XML provides a standard protocol with which these applications and organizations can communicate. Using XML Schema, a company can define a standard structure for its data that can then be used across multiple departments and organizations. This structured data enables developers to easily create applications that can communicate with each other without much effort.

In addition, most organizations use forms in one way or another, whether to enter a purchase request, submit expense report information, or track weekly status. If you look at a typical form, you will notice that the form itself is structured unlike a typical freeform document created in an application such as Microsoft Office Word 2007. In these freeform documents you can type anything you like in any way that you choose. Although a form may contain sections that allow you to enter freeform text such as comments, most of your typical forms are highly structured. Fields in the form usually require you to enter specific types of data such as sales numbers or costs. Since XML defines a structured data format (which can contain some unstructured elements) and forms are highly structured with bits of freeform data, it makes sense to tie together forms and XML data. Once a user has filled out a form that is connected to XML data, the data can easily be incorporated into back-end processes that understand the structure of the XML data for that form. So, this fits one of the main purposes of XML--tying together multiple processes using a standard protocol.

Since building forms based on XML just makes sense, many software developers want to create forms-based applications to collect data and store it as XML. However, until a few years ago, this was a tedious and time-consuming process. Developers had to use tools such as Microsoft Visual C++, C#, or Visual Basic .NET and write sometimes a tremendous amount of code to create a forms application. Often, forms applications share similar functionality, such as spell checking, calculations, and data validation. In order to share this functionality across multiple forms applications, software developers needed to create code libraries in order to reuse their code. This worked fine when sharing the code within the same department or company. However, developers across multiple companies were likely going to duplicate the same work unless, of course, companies purchased these libraries from a third-party vendor.

Developing forms applications in this way is not something that typical information workers can do. Usually this type of coding is reserved for advanced software developers. Another disadvantage of this approach is that different forms applications usually have different user interfaces. Each time a user fills out a form, he or she may need to learn a different set of commands and menu items. This learning curve costs the company time and money.

About five years ago, Microsoft recognized the need for a common tool to build forms based on XML technologies. Existing XML-based tools required a thorough understanding of XML, so most information workers had trouble understanding how to use them. Also, most information workers do not know how to write code and, therefore, could not easily use development tools such as Microsoft Visual Studio. Therefore, it just made sense to create a tool that developers and information workers could use to create forms based on XML and that users could use to fill out those forms. That tool is InfoPath. (In Chapter 1, we'll tell you exactly what InfoPath is all about and introduce you to the extensive feature set included in this application.)

Looking at the wealth of features included in InfoPath, especially those added in InfoPath 2007, it also just made sense to create this book. This book is titled Designing Forms for Microsoft Office InfoPath and Forms Services 2007 for a reason. It's all about designing forms using InfoPath 2007, as we're sure you have figured out by now. This book will teach you everything you need to know about creating forms using InfoPath 2007 and probably a few things you never thought you needed to know.

Who Should Read This Book

Whether you are an information worker who has created only a few forms in Word or a software developer who is familiar with more advanced coding concepts, if your intention is to learn how to design InfoPath forms, this book is for you. This book will talk about not only the basics of designing forms but also such advanced concepts as writing managed code for InfoPath. As long as you have an understanding of basic form concepts and a desire to learn, you are in the right place. If you want to learn everything you can about InfoPath 2007, you have found the right book.

How This Book Is Organized

This book contains two parts. Part I is all about designing forms in InfoPath. No prior coding experience is required to understand the concepts, so both information workers and developers can use Part I to learn the basics of InfoPath form design. Many chapters build on previous chapters and become slightly more advanced as you progress. For example, in Chapter 4 we discuss advanced controls and customization, but by Chapter 6 we show how to pull external data, such as from a Web service, into your forms. By the time you finish reading Part I, you should know everything you need to know to design an InfoPath form for the InfoPath client application or for the browser without having to write any code.

Part II is about advanced form design. In this part of the book we talk about using more advanced form design techniques, including how to write code for InfoPath. These chapters are geared mainly toward software developers who have some basic coding experience. However, if you are an information worker and you have completed Part I of this book, the second part may interest you as well. In Part II, we talk about such topics as the InfoPath object model (Chapter 15), advanced topics regarding InfoPath Forms Services (Chapter 17), and ways to host InfoPath (Chapter 18).

Conventions Used in This Book

We use a few typographical conventions throughout this book. Bold text indicates key topics or terms. The names of features shown in the user interface, such as menu items, appear in italic text.

Information that pertains to InfoPath Forms Services is clearly displayed as features in the text. These tips will let you know when certain InfoPath features work differently in browser forms or don't work at all.

Samples

Almost every chapter in this book has one or more samples, which you can download from the Addison-Wesley Web site for this book. Sometimes the samples are InfoPath form templates (.xsn) files, which is the case throughout Part I. In order to use these form templates, you first need to open them in InfoPath design mode and resave them to a local folder. (This will make more sense after you start reading Part I.) Trying to open the form template in order to fill it out without first saving it will result in an error. Some samples include form (.xml) files in addition to form templates. To open the forms, first open InfoPath, and then open the XML file using the standard Open dialog (i.e., click on the On My Computer link from the Getting Started dialog.) The first time you open one of the sample forms, the dialog shown in Figure P.1 will be displayed. This dialog allows you to choose the form template associated with the form you are trying to open. The text of the chapter indicates the correct form template to use. After you choose the form template, click the checkbox Always use this form template for this file. After the form is opened, immediately save it. This will prevent you from having to choose the form template each time you open the form. Some sample form templates define one or more data connections. For these samples to work properly, the external data source must exist. To see if a form template depends on a data connection, go to the Data Connections menu item under the Tools menu while in design mode. Since there are many types of data connections, we'll describe how to set up each one to successfully preview the form.
  • XML document: If the XML (.xml) file exists within the form template (under the Resource Files menu item on the Tools menu), there is nothing you need to do. If the XML file is external to the form template, you will need to click the Modify button on the Data Connections dialog to point to your copy of the XML file. You can find the file within the samples for a given chapter.
  • Database: A database connection depends on a SQL Server or Access database. If the sample uses a SQL Server database, you must have SQL Server installed and have administrative rights to the SQL Server instance. For an Access database, the chapter will include an Access database (.mdb) file. For either case, click the Modify button on the Data Connections dialog to update the data connection to point to your database to restore the connection.
  • Web service: To use a Web service, you must have Internet Information Services (IIS) 6.0 or higher installed on your computer. The ASP.NET 2.0 ISAPI Web extension must be enabled, and ASP.NET should be configured to render .aspx pages. Copy the Web service code from the sample and paste it into a new ASP.NET Web service project in Visual Studio 2005. If you don't have Visual Studio, you can still create the Web service by creating a text file with extension .aspx within an IIS virtual directory. Check to see if the Web service code requires read or write access to specific directories; you can grant access to those directories or simply update the code to use directories of your choice. Before using the Web service with InfoPath, try navigating to the Web service by using a Web browser on the local machine. Once the Web service works outside of InfoPath, you can click the Modify button in the Data Connections dialog to change the Web service connection from the sample
  • SharePoint library or list: The prerequisite to using samples with a SharePoint library or list connection is a Microsoft Office SharePoint server. If you have a SharePoint server, ensure you have at least reader rights if the connection is only reading data. Likewise, if the sample form template submits to a SharePoint library, you must have contributor or higher privilege. Ensure the library or list upon which the form template depends actually exists on the server. To use your library or list, edit the connection to point to your server and select the appropriate library or list.

In Part II of this book, most of the samples include code. Those samples that require you to perform special actions (or actions in a specific order) to build the samples include ReadMe.txt files that explain what you need to do.

For sample form templates that include form code, you must do the following. First, find the sample form template (.xsn) and archive (.zip) files with the same name. Extract the archive to a location on your computer by right-clicking on the .zip file and selecting Extract All. Next, open the form template in design mode as you would for samples without form code. Select the Microsoft Visual Studio Tools for Applications (VSTA) menu item under Tools and then Programming. If InfoPath cannot find the VSTA project, the dialog shown in Figure P.2 appears. Click the Browse button to navigate to the Visual C# Project (.csproj) file within the extracted folder. Once the Microsoft Visual Studio Tools for Applications window appears, hit F5 to fill out the form while previewing it. The debugger will be automatically attached, so any breakpoints or unhandled exceptions halt form execution.

Some samples in Part II require references to the interop assemblies for InfoPath. In order to set a reference to the correct interop assemblies, open the Add Reference dialog in Visual Studio and browse to the install location for Microsoft Office 2007. (This is usually C:\Program Files\Microsoft Office\Office12.) Then, locate the ipeditor.dll file and select it. This will include the Microsoft.Office.Interop.InfoPath interop assembly that you need as well as a few assemblies that aren't needed. In order to be able to install the samples, you will need to remove the references to the ADODB, MSHTML, and MSXML2 assemblies. Some samples use the Microsoft. Office.Interop.InfoPath.Xml assembly. You can also locate this assembly in the install location for Office 2007.

Some code snippets that you see within chapters may differ from the code in the sample. Due to space constraints, brevity in code may have resulted in reformatting or removal of comments or error-handling code that are not required to understand the sample. Regardless, the functionality of the code itself remains unaffected. Note that the code included with the sample form templates is not considered production quality. The code samples, not to mention the form templates themselves, have not been subjected to the rigorous testing you would expect from a company such as Microsoft.

Feedback

After you read this book, we would love to hear what you think about it--both positive and negative. This will help us improve future revisions. Also, feel free to send us any questions you may have. We would be happy to help. To contact us, simply send us an e-mail at DesigningIPForms@hotmail.com. If you have a question, either Scott or Hagen will reply as quickly as possible. We hope that you enjoy the book and that it makes the process of designing InfoPath form templates much easier.

Read More Show Less

Customer Reviews

Average Rating 3.5
( 4 )
Rating Distribution

5 Star

(2)

4 Star

(0)

3 Star

(1)

2 Star

(0)

1 Star

(1)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 4 Customer Reviews
  • Anonymous

    Posted March 3, 2007

    XML with little or no programming

    As XML has become the industry standard, Microsoft has increasingly oriented its Office suite to use it. The latest result is this enhanced InfoPath, in its 2007 incarnation. The book is divided into two parts. Each targeting a different audience. The first part is aimed at a general purpose Office user, who is not assumed to be a programmer. It addresses what is a problem plaguing XML. If you want to make a new XML schema to use as a template for future data instances, you often have to write the explicit XML tags. Unfortunately, the syntax can be overwhelming to many. Plus, explicitly writing the tags is extremely error prone. What InfoPath has done is make an easy to use graphical front end. Far friendlier to the user. This user interface then can generate a schema in a robust fashion. Even people capable of editing schemas directly might still want to use what Microsoft has provided. Along these lines, chapter 5 is a good example. While not perhaps directly concerning schema, it tackles the problem of validating what the user types into a form. It follows the approach that you should clean up your data as early as possible. Preferably before it even gets into the database. The UI lets you impose constraints on the user input into various fields of your form, by offering dialog windows with many options. All commendably straightforward. The second section of the text is mostly for programmers, who have already written code for Office.

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 12, 2011

    No text was provided for this review.

  • Anonymous

    Posted June 8, 2010

    No text was provided for this review.

  • Anonymous

    Posted February 11, 2009

    No text was provided for this review.

Sort by: Showing all of 4 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)