How can I get a WORD print view, when print view will not work - InfoPath Dev
in

InfoPath Dev

How can I get a WORD print view, when print view will not work

Last post 05-14-2009 05:27 PM by Patrick Halstead. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 04-23-2009 05:40 AM

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    How can I get a WORD print view, when print view will not work

    Question 1 

    My client is demanding to have a document I have created in InfoPath visible in MS WORD. I have tried getting the client emailing themselves, and try to edit then.

    But traces of drop down blocks are still there, blocks of expression box data is still restricted within a sort of expression box.  The client is not happy.

    The document then supposed to then have data added and edited before sending off to his clients.

    Now I have not learned how to get into the Print to Word function.  I know it can be done, but I cannot see the solution.

    Please help someone, anyone to outline the steps involved, and some of the code structures too.
    I don't want a complete working solution, that is my task, I just want some mean ing ideas on the steps involved.
     All thoughts are most welcome.

    I believe you have to set up an xslt  transform document.  Prior to now I have been using XP home.  I am now on XP professional. Maybe that will help.
    .
    .
    .
    Question 2 

    I built the document on a machine with XP home. On another machine. 

    I recently transferred it to the XP professional machine.  And I keep getting a error coming back when I run the application.

    Error says ......... "A required data source is not available. Some form elements, such as drop down lists, may be blank."

    In checking for the cause, I have created a blank IP form with 5 of the fields in the db in question. I still get the same error. ??????

    I am thinking the problem is in the ACCESS db.  But I can open and edit the MS Access db without any trouble.  Or, is it because some important IP system function is not available??
    I am checking the database by deleting separate tables. Hopefully then I can isolate the area of concern.

    Any help please. FOR BOTH questions.

  • 04-27-2009 02:32 PM In reply to

    Re: How can I get a WORD print view, when print view will not work

    Response to Q1: Couldn't you do a Print View that gathers all the data in your InfoPath form into one view instead of Word? What benefit would you get from Word? If necessary, it can be done, but programmatically. The following link shows an example:

    http://www.bizsupportonline.net/infopath2003/convert-infopath-form-into-word-doc-send-email-attachment-outlook.htm

    Response to Q2: Check your data connections to see if there are any orphaned connections. I suspect that there may be one. Also, look at the fields that used to reference data connections and see if they are referencing the orphaned connection. I got this error once and I couldn't figure out what happened. It turns out that a drop down list was referencing a data connection that no longer existed.

    I hope this helps!

  • 04-28-2009 03:02 AM In reply to

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    Re: How can I get a WORD print view, when print view will not work

    Just for the question 1 now.

    I have a large form, that the client builds, it has lots of drop down boxes. And lots of lines and paragraphs that can be hidden if not selected. 

    I previously,
    (until last Sunday afternoon spent 14 hours change the dropdown controls to Text boxes
     and re entering all the display conditions, they get magically removed when you change the Control type UGGH) 
    had drop down boxes in the Print view.

    The print view looks good, but cannot line strech (fill the line as in word).
    Also, the user cannot get into that Print view and cut and paste further to suit their needs.

    If they could copy and paste TEXT ONLY into MS Word, it would satisfy their needs.

    Now I have been working on the  for 4 months, and I want it finished.

    So please can InfoPath do what I want, Or am I missing something?

     

    For Question 2,

    I shall investigate later. I hope you are correct.

    However, I have done all the extensive work as listed in Question 1 above on the "XP home" computer.
    The program runs well, I have installed it at the clients site yesterday. 
    Waiting for comments and alterations  to come back.
    This version I will transfer to the XP professional machin and see if it works. 

    Mind you, for test purposes, I created a one control field Form, and the form failed for the same reason. With the same Access database.

    The database on the XP home machine is now different. I will transfer it too and see if the problem goes away.
    I will keep you updated.

  • 04-28-2009 09:28 AM In reply to

    Re: How can I get a WORD print view, when print view will not work

    For Q1:

    You'll have to use C# in VSTA to accomplish this. I believe if you have IP 2007, then you are able to use VSTA without Visual Studio. If you don't have Visual Studio, you may want to try Visual Studio express...but I'm not sure if it'll work. The following link teaches you how to accomplish your InfoPath > Word conversion using C#...personally I use VB.

    http://www.bizsupportonline.net/infopath2007/convert-infopath-form-into-word-2007-document-xslt-c-sharp.htm

    For Q2:

    I look forward to heaing how it goes with the data connection.

  • 04-30-2009 04:55 AM In reply to

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    Re: How can I get a WORD print view, when print view will not work

    Thanks for the reply,

    But is VSTA  windows Vista.  I am on XP would that make any difference.

    All the same I shall now peruse the link you suggested.

    Have a good night.  I'll let you know how I went.

    Ian

  • 05-14-2009 06:19 AM In reply to

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    Re: How can I get a WORD print view, when print view will not work

    Obviously you have not tried to do theis .

    But if I wanted to edit the document, that is, polish up the presentation before printing the document, you have to go into WORD to do so.

    Things like fill the line, wrap long fields over two lines and so on.

    Please come back with a majic answer.

    As soon as possible, like tomorrow.

    Would be much appreciated.

    Ian

  • 05-14-2009 09:21 AM In reply to

    Re: How can I get a WORD print view, when print view will not work

    Hi Ian,

    I seem to recall replying to you before about Print views telling you they were hard and not for the faint-of-heart. We *have* done them several times, but we generally prefer not to because they are complicated and the Word template must be updated whenever the form changes (plus it must be installed on the machine that will print, being a Smart Doc solution).

    Have you looked at saving your docs to a DB and using xPertDoc's solution? They have a Word tool that allows you to pull the XML data from an XML form or directly from a DB and print using Word.

    We'd be happy to spend 8-12 hours on your print view (which is what it will take), but you'll have to donate to the cause first. We're busy and need to put food on the table. Print views are not something that can be answered in just a quick 10-15 minute forum post.

    Thanks for your understanding! Hope things are well in Aussie land. I'm doing a Seattle rain dance right now ...

    Patrick Halstead
    Project Manager at Qdabra
  • 05-14-2009 03:54 PM In reply to

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    Re: How can I get a WORD print view, when print view will not work

    Point taken Patrick.

    I am trying to earn some money here too.  I have been working on this god damn system for 5 months now  for a total of $400 AU. 

    And now they want to almost scrap it and go another direction.

    They plan to use a heavily interfaced Word document and MS Access db.

    I only want to get the starting clues to usaing the XMl technology and how to start the whole process, I will complete the task.  I seem to be coming up against brick walls. I  am close I think to starting to make progress.

    I understand you have to make changes to the XML process each time you change the FORM.

    Every time now that I change the form, I have to go into the InfoPath print view and change that. 

    I had to remove all the drop down boxes from the print view just to clean uup its appearance,

    Again any clues would be a start.

     

    Regards

    Ian

     

  • 05-14-2009 05:27 PM In reply to

    Re: How can I get a WORD print view, when print view will not work

    Quick reply for now: I believe the InfoPath 2003 SDK contains an example of Word Print Views. Have you looked at it? It will require binding the XSD to the Word Smart Doc and creating an XSL to handle the incoming XML for the print. Limitations exist and it's a lot of work, but *you can* do it.

    More later,

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.