Is there a way to fill an Infopath 2003 form programmatically using Visual Basic 6 (for example through the COM interface)?
Infopath is XML based so there are no programming hooks (like you are thinking of) to manipulate the interface. It is possible to prefill a form from another language by manually changing the XML before the user opens it. InfoPath also supports multiple internal scripting languages if you are the form designer.
If you want to share more information about your situation we can recommend the best way.
Related
I am currently in a situation where I have a sub form inside a page of a PDF Template, with a group of fields wrapped inside the sub form.
I am using Adobe Lifecycle designer ES2 to create my templates.
Is it possible using ABCPDF tool(ABCpdf .NET Pro 7), to hide/unhide the sub form, along with wrapped fields through the code.
I am using C#, .NET (4.0), visual studio 2010.
Adobe Lifecycle Designer uses a different type of form than ABCPDF 7 uses.
See this description. Towards the bottom we have this:
You can use Acrobat to edit forms using the Advanced Editing tools available under the Tools menu.
However, if you choose items from the Forms menu or toolbar, then you will probably find that you end up editing your form in Adobe Designer rather than Acrobat.
Adobe Designer is an application which comes with Acrobat Pro. It uses PDF as an output medium. However, the way that Designer operates means that forms created by Designer are fundamentally different from forms created by Acrobat.
For example, an Acrobat created form typically contains a background and then a set of fields. The fields operate separately from the background.
Adobe Designer-created forms do not make this distinction. They use a separate data store to specify the fields. The PDF content is merely the visible rendition of this field specification. The underlying field specification is made up of chunks of XML embedded in the PDF.
(The word "Livecycle" was added to the product name after this was written, when it was still called "Adobe Designer".)
The forms supported by ABCpdf, also known as AcroForms or eForms, do not even have a concept of "subform" and so what you are talking about is impossible with ABCpdf.
We have a client that has a requirement to disable the source tab on components, they want to force them to use the GUI fields only and not mess around with any source.
Whilst this is easy to accomplish for rich-text fields I cannot find a configurable way of doing it for the whole component.
I'm presuming I'm going to have to modify the GUI somehow and make the source tab only viewable by administrators (or a specifically created user group). What I lack is a) the knowledge on how to do this and b) knowing whether this can be done via a method I'm unaware of.
Any help appreciated as I've not had to customise the GUI since 5.2 SP1.
I'm looking for some high-level help with determining the best type of Visual Studio 2010 project to use for an Excel custom application.
I will be developing a program that requires the user to enter a dataset in a particular way. Not using a form per se, but rather in columns and the program will need to do some custom validation on the items in order to prep the data. From there, the user will be able to conduct various operations on the data via a custom Ribbon and associated options. The program will also transmit the data via web service.
I've fooled around with the Add-In project and that gives me a lot of what I need but I'm wondering if a Template or Workbook project is better for this in terms of data entry and being able to "guide" the user a little more.
How do you go about choosing between which project type to use? Do all the project types support a custom Ribbon?
Sorry if this is too far off topic. I'm referring to VBA, not Visual Studio, but it might still be relevant.
With an AddIn, compared to a Workbook, you can separate your code from the user's data. So, if the code is complex, and you'll need to update it separately from user's workbooks with data, this is not a bad idea.
With an AddIn, you can add buttons that do things like check to make sure the user data workbook is ok, or process it in someway. However, the AddIn custom buttons will load ever time a user opens any Excel worksheet. This doesn't sound good, but in practice, isn't so bad. You can code your AddIn so it does nothing as long as no one uses a button, so it almost doesn't hurt load times, etc...
A Workbook might be useful if you need to really guide the user - that is, you cannot rely on the user to hit a button to verify something, and instead you need to verify on every change, for example. However, the workbook solution incorporates the user data and your code in the same workbook, so if you need to update the code for existing users' data, that's harder.
I use a combination of AddIn (.xlam) with buttons, and a template (with minimal self-describing data only).
I'm not sure about the template-only option, so won't comment on that.
Is it possible to configure a Ribbon (e.g. adding a tab etc.) in Office 2010 programatically via VBA? I.e. by writing VBScript code in a macro.
Br. Morten
You can manipulate a Ribbon tab and its controls using VBA, but you cannot create one. Not with the Object Model anyway. The best you could do - somehow - is to get some kind of OPC dll (like an ActiveX component) that handles opening/relationships/closing of OPC documents (like .docx documents) and old school MSXML for creating a ribbon definition and adding it to the package.
Have a look at this blog post for Excel
http://www.xtremevbtalk.com/showthread.php?t=265636
and this one for Word
http://www.wordarticles.com/Shorts/RibbonVBA/RibbonVBADemo.htm
If your UI is static, i.e. you don't need to programatically change the behavior of, or add/remove UI elements on the fly, you can define a customUI within a macro-enabled template. You can use your VBA functions as call-backs for the UI elements defined in the XML.
Have a look at this guide. In a nutshell, you define a customUI\customUI14.xml file within the .dotm archive. This XML describes your custom ribbon elements using this schema.
This definitely works for Word templates (.dotm files). I think a similar approach works for any OOXML format.
I'm working on an InfoPath form that's going to be run with InfoPath Forms Services on a SharePoint server. For a number of reasons -- mostly so that the customer can update the form without involving an administrator -- this can't be a form containing .NET code.
The form has a repeating group, and we have users who are a bit confused as to how to add and delete items from the repeating section. I've looked all over the Internets, but haven't been able to find a way to do this without adding a code project to the form.
Is there any way to write a rule or do something else to make a button that adds an item to a repeating section?
Have you considered using JavaScript instead? to add the functionality that you need. Most (if not all) the samples within InfoPath contain a JavaScript code-behind files. these should work within infopath forms services though I have not tried.