Infopath Xsn Files

N

njdude

I would like to acheive this

Let us say i have on one machine xsn files in C:\temp

i would like to copy that to another machine to a folder c:\machine2.

then the app would load the xsn file with NewFromSolutionWithData and
create a Infopath form with data out of it.

How would i achieve this ? The problem im having is transferring the
file from c:\temp on one machine to c:\machine2 on another machine. if
i just do a manual copy of the xsn file from 1 to 2 it does not work
and throws an error when running NewFromSolutionWithData

Error : ... update has been blocked because author coul dnot be
verified etc....

But if i take the xsn file from c:\temp copy it to c:\machine2 but
then open the form in design and then do a save and give it the same
name on c:\machine2 then everything works fine !!

so long story short is there a way in c# to open an xsn file in design
mode and do a save the xsn to a location ?

TIA
 
D

David Dean

You're probably better off publishing the form template to a location that
all the client machines can access, such as a web server or a file server
share. That way you won't have to republish the form template in design mode
when it's moved from place to place.
 
K

Kalyan G Reddy MVP (GGK Tech)

Hello

You can even try publishing forms to Sharepoint server or Infopath Forms
service if you ae using Infopath 2007.
 
N

njdude

Sorry for not responding for so long. i was away. Actually i looked at
the script from the link you posted.
It gives me a messagebox saying
"The following template cannot be registered...... because it contains
a publish URL"

so any ideas ? I think you are on the right track.
 
B

ben Goth

If I read your original problem correctly (I could be way out) the form is just not authorised on the second system so you could create a certificate that is authorised by both machines and sign the form with it on the first one so when its copied its still trusted.
I know its not the best method but depending on the amount of times you want to do this it could be viable



njdude wrote:

Sorry for not responding for so long. i was away.
28-Aug-07

Sorry for not responding for so long. i was away. Actually i looked a
the script from the link you posted
It gives me a messagebox sayin
"The following template cannot be registered...... because it contain
a publish URL

so any ideas ? I think you are on the right track

On Aug 1, 10:26 pm, David Dean <[email protected]
wrote:

Previous Posts In This Thread:

On 30 July 2007 15:59
njdude wrote:

Infopath Xsn Files
I would like to acheive thi

Let us say i have on one machine xsn files in C:\tem

i would like to copy that to another machine to a folder c:\machine2

then the app would load the xsn file with NewFromSolutionWithData an
create a Infopath form with data out of it

How would i achieve this ? The problem im having is transferring th
file from c:\temp on one machine to c:\machine2 on another machine. i
i just do a manual copy of the xsn file from 1 to 2 it does not wor
and throws an error when running NewFromSolutionWithDat

Error : ... update has been blocked because author coul dnot b
verified etc...

But if i take the xsn file from c:\temp copy it to c:\machine2 bu
then open the form in design and then do a save and give it the sam
name on c:\machine2 then everything works fine !

so long story short is there a way in c# to open an xsn file in desig
mode and do a save the xsn to a location

TIA

On 30 July 2007 16:30
DavidDea wrote:

You're probably better off publishing the form template to a location that all
You're probably better off publishing the form template to a location that
all the client machines can access, such as a web server or a file server
share. That way you won't have to republish the form template in design mode
when it's moved from place to place

--
David Dea
Sr. Member Technical Staf
Insource Technology Corp

:

On 31 July 2007 12:00
KalyanGReddyMVPGGKTec wrote:

HelloYou can even try publishing forms to Sharepoint server or Infopath Forms
Hell

You can even try publishing forms to Sharepoint server or Infopath Forms
service if you ae using Infopath 2007

--
Kalyan G Reddy - INFOPATH MVP 200
http://www.ggktech.com


:

On 01 August 2007 18:11
njdude wrote:

so the short answer is there is no way of acheiving what i want?
so the short answer is there is no way of acheiving what i want? :(

On 01 August 2007 22:26
DavidDea wrote:

Re: Infopath Xsn Files
The RegisterSolution() method might be what you're looking for

http://msdn2.microsoft.com/en-us/library/bb229810.asp

You should be able to execute this function via Windows Scripting Host
automation code or COM interop in a .NET lanugague

--
David Dea
Sr. Member Technical Staf
Insource Technology Corp

:

On 28 August 2007 17:15
njdude wrote:

Sorry for not responding for so long. i was away.
Sorry for not responding for so long. i was away. Actually i looked a
the script from the link you posted
It gives me a messagebox sayin
"The following template cannot be registered...... because it contain
a publish URL

so any ideas ? I think you are on the right track

On Aug 1, 10:26 pm, David Dean <[email protected]
wrote:

EggHeadCafe - Software Developer Portal of Choice
WPF Enums in XAML And Root Addressing For Images
http://www.eggheadcafe.com/tutorial...a-01bb29ea4e02/wpf-enums-in-xaml-and-roo.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top