AddParagraph () as WParagraph //Adds new text to the paragraph paragraph. RichText ) as BlockContentControl //Adds new paragraph in the block content control WParagraph paragraph = blockContentControl. AddBlockContentControl ( ContentControlType. Body //Adds block content control into Word document BlockContentControl blockContentControl = textBody. AddSection () WTextBody textBody = section. Creates a new Word document WordDocument document = new WordDocument () //Adds new section to the document IWSection section = document. AppendPicture ( imageStream ) //Creates memory stream MemoryStream outputStream = new MemoryStream () //Saves and closes the Word document instance document. Read ) //Adds image to the paragraph paragraph. AddParagraph () as WParagraph //Gets the image stream FileStream imageStream = new FileStream (, FileMode. ResetCells ( 2, 3 ) //Adds new paragraph to the block content control paragraph = blockContentControl. AddTable () as WTable //Specifies the total number of rows and columns table. AppendText ( "Block content control" ) //Adds new table to the block content control WTable table = blockContentControl. But if you like the way they are now, then also please tell us that in the comments section.//Creates a new Word document WordDocument document = new WordDocument () //Adds new section to the document IWSection section = document. In a perfect world I would have chart tags, and import tags, still be content controls, but out tags and all the other ones should be fields.Īny feedback that you have going either way would be greatly appreciated because the company will be looking at the comments of this post to make a decision as to whether or not we will change the way tags work in autotag. Content controls are harder to select and move around Fields are easier to copy paste since they are easier to select.Ĥ. If you try to delete the content control it just deletes the nickname text, to fully delete the tag you have to hit the delete button.ģ. The only surefire way around this is to use the arrow keys.Ģ. This is because to exit a content control you have to click the mouse into an area that has regular text, if you click off to the side of the page it will not exit. I often find myself clicking outside of the content control, only to have the tag builder window open because word counts my clicks as a double click on the content control. If you are in a content control it can be hard to exit and get back to editing regular text. I have worked extensively with both types of tags, and personally I like the field tags more. The main reason we did this is because with a content control you can insert charts and images directly into the control, so for certain tags instead of seeing text, you get to see the actual object that will be in the final report.Īnother benefit of switching to content controls was that with fields it was possible to delete some of the field text, the nickname of the tag, which in turn would delete some of the tag causing errors on report generation. The tags are still the same, but instead of using a 'Field', we have switched to 'Content Controls'. The latest release of Autotag, version 9, has switched to a new way of tagging in Office.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |