amallison Posted March 23, 2011 Posted March 23, 2011 When I try to extract fields that are in a table inside Word with Scribe I get an Error message 'Cannot resolve value for tag:...'. Trying to write to fields inside a Word table corrupts the Word document. Word says it has problem with the content. I can't see anything in the forum or documentation to say you can't do this. Are tables not supported in Word by Scribe?
Smef Posted March 23, 2011 Posted March 23, 2011 Scribe supports reading from .doc files with ScribeFileAsText and .docx files with ScribeDocReadValue, ScribeDocSubstitute and ScribeFileAsText. ScribeDocReadValue and ScribeDocWriteValue will allow you to write to/from text content control fields but not to table cells at this time (like you can with .xlsx documents). What function are you calling to write to the cells in your table?
amallison Posted March 23, 2011 Author Posted March 23, 2011 I'm using .docx files. I'm using your 'How to use Scribe' document, which is using ScribeDocReadValue and ScribeDocWriteValue. Will this be an option is a release soon? Could you add to your documentation that Word tables are not included? (It took me a day to trouble shoot this.)
amallison Posted March 23, 2011 Author Posted March 23, 2011 It also seems to not work on tags in text boxes. Does it only work on the default body of the Word document? Is there any way to make it work with a layout that looks like a form/table in Word?
Smef Posted March 24, 2011 Posted March 24, 2011 I'm still not clear about what values you're passing in to the writevalue and readvalue function. Are you passing cell names or content control field names?
amallison Posted March 26, 2011 Author Posted March 26, 2011 For the readvalue I'm passing the name of the field to extract. The field name comes from the tag in the .docx file and can be verified by using ScribeDocListFields. The writevalue passes the field name and value to write into that field.
Smef Posted April 5, 2011 Posted April 5, 2011 I'm not able to reproduce this in my test in. I have been able to successfully write to a text content control field in a table. Could you upload or email me a document in which the write is failing for you?
amallison Posted April 5, 2011 Author Posted April 5, 2011 I have attached a file with a simple table. The tags can be extracted, and they are: FamilyName Date Helper Phone I can write to these tags but I get an error trying to extract the data. _TableTest.docx.zip
Smef Posted April 6, 2011 Posted April 6, 2011 I have been able to reproduce the issue of reading from a content control field in a table and will look into this issue. So far I have not been able to reproduce a problem with writing to a content control field in a table.
Recommended Posts
This topic is 4979 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now