Home

officeatwork API

image

Contents

1. Basics General The XML parameter is as the name already indicates a parameter written in XML format Therefore all rules and regulations on how to present information in XML format apply If you do not know what XML is we recommend that you first learn more about XML before you continue reading this manual Just as a reminder we have listed a few characters that are used to structure the information in XML format and therefore are not allowed to be used elsewhere If you want to use one of these characters for any purpose other than structuring your XML for representing your business data for example you must replace those characters with the equivalent replacement as listed below Reserved Character equivalent replacement 8 amp amp amp apos gt amp gt lt amp lt amp quot Encoding If you plan to include special characters like 2 etc within your XML parameter you must include an encoding tag at the beginning of your XML file This will make sure your special characters are correctly interpreted Sample encoding tag lt xml version 1 0 encoding ISO 8859 1 gt Chapter officeatwork Integration Architecture for Business Applications 21 XML Parameter The XML Parameter consists of easy to follow instructions that are processed when passed to officeatwork The following simple XML file is a sample that when executed will create a letter and present the finished document to the user
2. amp AutoSignatureName files logo jpg true Chapter Appendix 55 Concat Available The Concat function is available in the following Templates and Contents Excel Templates Signature Templates Description The Concat function allows you to combine string elements Syntax Concat Text1 Text2 Parameter Text A text element Example Concat Translate Doc Phone GetMasterPropertyValue Company EmailAddress2 GetMasterPropertyValue Available The GetMasterPropertyValue function is available in the following Templates and Contents Excel Templates Signature Templates Description The IF function is used to create conditional content Should for instance the Translation Doc Phone only be visible if the contact person has a phone assigned to him then the IF function can be used to specifiy that condition Syntax 56 officeatwork API Parameter Test Logical test like A B or 1 gt 2 or GetMasterPropertyValue Company Email TrueValue Return value if Test equals True FalseValue Return value if Test equals False Example IF GetMasterPropertyValue Company EmailAddress2 GetMasterPropertyValue Company EmailAddress2 Available The If function is available in the following Templates and Contents Excel Templates Signature Templates Description The IF function is used to create conditi
3. ec Ll Ca Su IQs E _ gt LL aed gt Za XML oe Ga business XML officeatwork Microsoft document application Office XML XML template template Figure 12 recommended architecture for creating an office document out of your business application via officeatwork This architecture has many advantages Limited programming necessary the business application only needs to be taught how to process the OSC shortcut file This can be implemented so that new data items available in your business application will not require the reprogramming of the interface to officeatwork Neither does new officeatwork functionality require a reprogramming of the interface Optimal job sharing by separating the interface into different parts Process Definitions Design the development cycle and complexity is kept to a minimum Chapter officeatwork Integration Architecture for Business Applications 23 Easy testing as the final result coming from your business application is an OSC File you do not need to wait until the programming is finished to test the interface You can just create sample osc files and double click them to test your definitions and design Simple Debugging as the result coming from the business application is a file it can easily be analysed You can easily isolate individual parts of the file to find out any mistakes in the document creation process 24 officeatwork API Samples
4. End Sub 80 officeatwork API Recipient This code sample shows how to create a document including recipient information The template used is the Letter template and the document language is set to English UK 2057 Sub OfficeatworkApiSample Dim 10awAPI As oawAPI API Dim lParam As String lParam lt xml version 1 0 encoding 1S0 8859 1 gt lParam lt Parameters gt amp _ lt CreateDocument gt lParam lParam amp lt Language gt amp _ 2057 amp _ lt Language gt 8 _ lt TemplateID gt amp _ Letter amp _ lt TemplateID gt amp _ lt ShowDocumentWizard gt amp _ Godt g lt ShowDocumentWizard gt lParam lParam _ lt MasterProperties gt amp _ lt MasterProperty IDName Recipient gt amp _ lt Field Name Company Value Muster AG gt 8 _ lt Field Name Department Value Marketing gt amp _ lt Field Name FullName Value Mrs Jolanda Smith gt 8 lt Field Name AddressStreet Value Matten 12 gt amp _ lt Field Name AddressZIP Value 1111 gt amp _ lt Field Name AddressCity Value Musterlingen gt amp _ lt Field Name Telephone Value 41 0 44 444 4444 gt 8 lt Field Name EMail Value jolanda smith examplesolution com gt amp _ lt Field Name Introduction Value Dear Mrs Smith gt amp _ lt Field Name Closing Value Kind regards gt
5. amp _ lt Parameters gt Set lOawAPI New oawAPI API If lOavAPI ExecuteXML lParam 1 Then MsgBox successfully created document Else MsgBox the document could not be created End If Set lOawAPI Nothing End Sub Chapter Appendix 79 Multiple Documents This code sample shows how to create multiple documents in one go The template used is the Offer template and the document language is set to German Switzeland 2055 Sub OfficeatworkApiMultiple Dim lOavAPI As OavAPI API Dim lParam As String lParam lt xml version 1 0 encoding ISO 8859 1 gt lParam lt Parameters gt amp _ lt CreateDocument gt amp _ lt TemplateID gt amp _ offer amp _ lt TemplateID gt amp _ lt ShowDocumentWizard gt amp _ Wed d lt ShowDocumentWizard gt amp _ lt Language gt amp _ 2055 amp _ lt Language gt amp _ lt CreateDocument gt amp lt CreateDocument gt amp _ lt TemplateID gt amp _ Letter amp _ lt TemplateID gt amp _ lt ShowDocumentWizard gt amp _ 1 8 lt ShowDocumentWizard gt amp _ lt Language gt amp _ 2055 amp _ lt Language gt amp _ lt CreateDocument gt amp _ lt Parameters gt Set lOavAPI New oawAPI API If lOavAPI ExecuteXML lParam 1 Then MsgBox successfully created docuent Else MsgBox the document could not be created End If Set lOawAPI Nothing
6. Invoice Summary Title gt lt Content gt LOOP IncidentTotals lt Content ID Invoice Summary Item gt lt Value Name GroupBy incident type Value ERP GroupBy incident type gt lt Value Name Sum_total Value ERP_Sum_total gt lt Value Name Sum_vat Value ERP_Sum _vat gt lt Content gt END LOOP IncidentTotals LOOP InvoiceTotals lt Content ID Invoice Summary Total gt lt Value Name Sum_total_incl_vat Value ERP_Sum_total_incl_vat gt lt Value Name Sum_total_vat_relevant Value ERP_Sum_total_vat_relevant gt lt Value Name Sum_total_vat_irrelevant Value ERP_Sum_total_vat_irrelevant gt lt Value Name Sum_vat Value ERP_Sum_vat gt lt Content gt END LOOP InvoiceTotals lt Content ID Invoice Accounting Details gt lt Content gt lt Contents gt lt Output gt lt Print UID 2007010510574768320716 ShowDialog 0 gt lt Output gt lt CloseDocument gt 1 lt CloseDocument gt lt CreateDocument gt lt Parameters gt Please note that we recommend using as identifier for business application placeholders Make sure you have removed all placeholders in the final OSC file that gets passed on to officeatwork Sample 2 This sample creates two different documents The first is a summary document used in the accounting department The second is a document concerning the same data but offers more details It is printed for inte
7. Manual for developers officeatwork API Version 3 10 This Manual was created using officeatwork Advanced 21 September 2010 officeatwork AG has prepared this manual with the greatest possible care so as to ensure that the information contained herein is easy to understand accurate and reliable Nevertheless officeatwork AG is in no way liable for any issues which have any connection with this manual including and without restriction its standard quality and availability for special purposes From time to time officeatwork AG will revise the software described in this manual and reserves the right to do so without prior advice to the customer Under no circumstances is officeatwork AG liable for indirect special or incidental damages resulting from the purchase or use of this manual or the information contained herein This guarantee exclusion has no impact on the statutory rights of the user I Copyright 1992 2010 officeatwork AG Switzerland All rights reserved officeatwork is a registered trademark of officeatwork AG Microsoft Word Microsoft Office Windows Windows 95 Windows 98 Windows NT Windows Vista and MS DOS are trademarks of the Microsoft Corporation Other names of companies products or services may be trademarks or registered trademarks of the respective owners officeatwork AG Bundesplatz 12 CH 6300 Zug Switzerland H 0900 566 088 Hotline CHF 3 50 per minute on the Swiss
8. Sample 1 This simple OSC Template File creates an Invoice summary document and prints it with an officeatwork output management variant The document is closed without saving lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt TemplateID gt Invoice lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt Language gt ERP_account_lcid lt Language gt lt MasterProperties gt lt MasterProperty IDName Company Where IDName Is ERP_organisation_name gt lt MasterProperty IDName Contactperson Where UID Is 2003121817293296325874 gt lt MasterProperty IDName Signaturel Where UID Is 2003121817293296325874 gt lt MasterProperty IDName Signature2 Where UID Is 2003121817293296325874 gt lt MasterProperty IDName Recipient gt lt Field Name CompleteAddress Value ERP_ invoice address gt lt MasterProperty gt lt MasterProperty IDName CustomField gt lt Field Name DocumentType Value ERP_translation invoice gt lt Field Name YourReference Value ERP_invoice ref gt lt Field Name Account Value ERP_account_displayname gt lt Field Name Project Value ERP_project_displayname gt lt MasterProperty gt lt MasterProperties gt lt Bookmarks gt lt Bookmark Name Subject Value ERP translation no ERP invoice number gt lt Bookmarks gt lt Contents gt lt Content ID
9. gt Field Field Field Field Field Field Field Field Field Field lt MasterPro lt MasterProp lt Field lt Field AACA A A A AN d d A Address Street City gt Field Field Field Field Field Field Field Field Field lt Field lt MasterPro NA NA ATA NA KR erty IDName Recipient gt ame IDName Value Sample Recipient 1 gt ame CompleteAddress Value Sample No 1 ame Company Value Company Sample 1 gt ame Department Value Department Sample 1 gt ame FullName Value FullName Sample 1 gt ame AddressStreet Value AddressStreet Sample 1 gt ame AddressZIP Value 1111 gt ame AdressCity Value AdressCity Sample 1 gt ame Telephone Value 11 0 11 111 1111 gt ame EMail Value 1 1 examplesolution com gt ame RecipientPrint Value 1 gt ame RecipientActive Value 0 gt perty gt erty IDName Recipient gt ame IDName Value Sample Recipient 2 gt ame CompleteAddress Value Sample No 2 ame Company Value Company Sample 2 gt ame Department Value Department Sample 2 gt ame FullName Value FullName Sample 2 gt ame AddressStreet Value AddressStreet Sample 2 gt ame AddressZIP Value 2222 gt ame AdressCity Value AdressCity Sample 2 gt ame Telephone Value 22 0 22 222 2222 gt ame EMail Value 2 2 examplesolution com gt ame RecipientPrint Value 1 gt ame RecipientActive Val
10. lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt TemplateID gt letter lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt CreateDocument gt lt Parameters gt Parameters tag All instructions must be enclosed in a lt Parameters gt tag Syntax lt Parameters gt lt Parameters gt Other XML tags on the root level of the XML file will be ignored by officeatwork The CreateDocument tag within the Parameters tag will instruct officeatwork to create a new document The tags within the CreateDocument tag describe how to create the document The TemplateID tag lets officeatwork know what template to use for the creation of the new document In this case it will be a document based on the template with the filename letter The ShowDocumentWizard tag is set to 0 so the document wizard will be completed without any user interaction necessary All default values in the wizard will apply The same sample using VBA and the API Method provided by officeatwork would look as follows Sub CreateLetter Dim lOavAPI As OavAPI API Dim lParam As String lParam lt xml version 1 0 encoding ISO 8859 1 gt lParam lParam lt Parameters gt lParam lParam N lt CreateDocument gt lParam lParam lParam lParam lParam lParam lParam lParam amp amp amp lt TemplateID gt Letter lt TemplateID gt SI lt ShowDo
11. 8 f Template Chooser 49 Return value 50 TemplateFilename 50 TemplateFullname 50 TemplateID 30 32 50 TemplatePath 50 Testing 23 Translate 62 Typographic codes amp conventions 5 y Users 7 Mes Value 63 VBA 12 VBA Samples 46 Visual Basic for Applications 12 XML 15 XML parameter 20 XML Parameter 21 officeatwork Ltd Bundesplatz 12 6300 Zug Switzerland
12. Bengali Bangladesh Bosnian Bosnia Herzegovina Bulgarian Burmese Catalan Cherokee United States Chinese People s Republic of China Chinese Singapore Chinese Taiwan 1078 1052 1118 1025 5121 15361 3073 2049 11265 13313 12289 4097 6145 8193 16385 10241 7169 14337 9217 1067 1101 2092 1068 1069 1059 1093 2117 5146 1026 1109 1027 1116 2052 4100 1028 Language Chinese Hong Kong SAR Chinese Macao SAR Croatian Croatian Bosnia Herzegovina Czech Danish Divehi Dutch Netherlands Dutch Belgium Edo English United States English United Kingdom English Australia English Belize English Canada English Caribbean English Hong Kong SAR English India English Indonesia English Ireland English Jamaica English Malaysia English New Zealand English Philippines English Singapore English South Africa English Trinidad English Zimbabwe Estonian Faroese Farsi Filipino Finnish French France French Belgium 3076 5124 1050 4122 1029 1030 1125 1043 2067 1126 1033 2057 3081 10249 4105 9225 15369 16393 14345 6153 8201 17417 5129 13321 18441 7177 11273 12297 1061 1080 1065 1124 1035 1036 2060 68 officeatwork API Language French Cameroon French Canada French Democratic Rep of Congo French Cote d Ivoire French Haiti French Luxembourg French Mali French Monaco French Morocc
13. CloseDocument Allows you to define if the active document shall be closed or left open Syntax lt CloseDocument gt lt CloseDocument gt 44 officeatwork API Content String If the value past equals 1 the document will be closed If the value past equals 0 the document will remain open Default behaviour If the CloseDocument tag is missing a value or is completely omitted from your XML Parameter the active document will remain open Sample lt ShowCustomDialog gt 1 lt ShowCustomDialog gt ReplaceExisting Allows you to define when the document is closed and saved whether it shall replace any existing document with the same name and path Syntax lt ReplaceExisting gt lt ReplaceExisting gt Content String If the value past equals 1 any existing document will be overwritten String If the value past equals 0 the active document will not be saved when it is closed if already another document exists with the same filename at the same location Default behaviour If the ReplaceExisting tag is missing a value or is completely omitted from your XML Parameter the active document will not be saved if a file with the same filename and location already exists Sample lt ReplaceExisting gt 1 lt ReplaceExisting gt Values Allows you to set values for the appropriate Values document functions within your document Syntax lt Values gt lt Value Name Value gt lt Val
14. DocumentType Value Invitation gt lt ServerProperty Name Segment Value Finance gt lt ServerProperties gt Output Allows you to use one of the officeatwork output variants Syntax lt Output gt lt Print UID ShowDialog gt lt Send UID ShowEmail FileName gt lt Save UID ShowDialog Path FileName ReplaceExisting gt lt Output gt 42 officeatwork API Content The Output element has the following sub elements Name Print Send Save Description Element This element triggers an officeatwork print variation to be executed Element This element triggers an officeatwork send variation to be executed Element This element triggers an officeatwork save variation to be executed The Print element has the following attributes Name UID ShowDialog Description String Represents the UID of the desired officeatwork print variant Element Indicates if the print dialogue should be presented to the user during the print process The value 1 will show the dialogue while the value 0 will suppress the dialogue The Send element has the following attributes Name UID ShowEmail Description String Represents the UID of the desired officeatwork send variant String Indicates if the e mail should be presented to the user during the send process The value 1 will show the dialogue while the value 0 will not show the e m
15. Schlauch_L3 gt amp _ lt Value Name PositionNr Value 1 gt amp _ lt Value Name Description Value Schlauch mit T Anschluss gt amp _ lt Value Name Price Value 31 70 gt 8 _ lt Content gt amp _ lt Content ID Karton_SX12_H4 LCID 2057 gt amp _ lt Content ID Titel Bookmark Text InsertionMethod 0 gt amp _ lt Contents gt lParam lParam amp _ lt Profile Where IDName Is Standard gt amp _ lt MasterProperties gt amp _ lt MasterProperty IDName Recipient gt amp _ lt Field Name Company Value Muster AG gt amp _ lt Field Name Department Value Marketing gt amp _ lt Field Name FullName Value Frau Jolanda Testerli gt amp _ lt Field Name AddressStreet Value Matten 12 gt amp _ lt Field Name AddressZIP Value 1111 gt amp _ lt Field Name AddressCity Value Musterfingen gt amp _ lt Field Name Telephone Value 41 0 44 444 4444 gt 8 lt Field Name EMail Value jolanda testerli muster com gt amp _ lt Field Name Introduction Value Sehr geehrte Frau Testerli gt amp _ lt Field Name Closing Value Freundliche Gr sse gt amp _ lt MasterProperty gt amp _ lt MasterProperties gt lParam lParam amp _ lt DocumentVariables gt amp _ lt DocumentVariable Name MeetingDate Valu
16. Xhosa Yi Yiddish Yoruba 10250 20490 21514 14346 8202 1072 1089 1053 2077 1114 1064 414 1119 1097 1092 1098 1054 2129 1105 2163 1139 1073 1074 1055 1090 1152 1058 1056 2080 2115 1091 1075 1066 1106 1076 1144 1085 1130 70 officeatwork API Zulu 1077 Chapter Appendix 71 API Samples OSC File Samples Bookmark This sample OSC file shows how to create a document and set the bookmark Subject to my new subject The template used is the letter template and the document language is set to English UK 2057 This sample can be found in the officeatwork example solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample Bookmark osc lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt Language gt 2057 lt Language gt lt TemplatelD gt Letter lt lt ShowDocumentWizard gt lt Bookmarks gt TemplateID gt 0 lt ShowDocumentWizard gt lt Bookmark Name Subject Value my new subject gt lt Bookmarks gt lt CreateDocument gt lt Parameters gt lt xml version 1 0 encodin lt Parameters gt lt CreateDocument gt ContentFolder This sample OSC file shows how to create a document that includes all Smart Contents within the Produkteofferte folder including its subfolders The template used is the
17. amp _ lt MasterProperty gt amp _ lt MasterProperties gt lParam lParam amp _ lt CreateDocument gt amp _ lt Parameters gt Set lOawAPI New oawAPI API If lOavAPI ExecuteXML lParam 1 Then MsgBox successfully created document Else MsgBox the document could not be created End If Set lOavAPI Nothing End Sub 81 Glossary O officeatwork Master Template An officeatwork Master Template is comparable to a Word template file ending in dot Within the Master Template the template format is allocated the margins adjusted the logos set up etc The Master Template creates the necessary foundation for the corresponding type of document such as a letter fax memo etc An officeatwork Master Template file has the ending owt officeatwork Smart Template An officeatwork Smart Template is a template which is connected to an officeatwork Master Template As well as this an officeatwork Smart Template contains different contents which are managed either by the officeatwork Smart Template Manager or the officeatwork Smart Content Manager An officeatwork Smart Template has been created multilingually so that every content can be processed in different languages An officeatwork Smart Template file has the ending ows Power User Proficient users who know how to use different computer applications very well are known as power users A Microsoft Word power user there
18. lt Field Name Introduction Value Dear Mrs Smith gt lt Field Name Closing Value Kind regards gt lt MasterProperty gt lt MasterProperties gt lt CreateDocument gt lt Parameters gt Save This sample OSC file shows how to create a document and save it using an officeatwork output variant The template used is the Baubewilligung template and the document language is set to German Switzerland 2055 This sample can be found in our officeatwork example solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample Save osc 76 officeatwork API lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt Language gt 2055 lt Language gt lt TemplateID gt Baubewilligung lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt Output gt lt Save UID 2006121210441235887611 ShowDialog 0 Path Desktop Filename Baubewilligung pdf ReplaceExistingFile 1 gt lt Output gt lt CloseDocument gt 1 lt CloseDocument gt lt CreateDocument gt lt Parameters gt Send This sample OSC file shows how to create a document and send it via email using an officeatwork output variant The template used is the Baubewilligung template and the document language is set to German Switzerland 2055 This sample can be found in our officeatwork exa
19. Language ID If omitted the Language ID of the destination document will apply Element This element contains a single name value pair If the associated content contains an appropriate value document function the value of the value Element will be placed at the position of the document function in the process of inserting the content into the target document The Value element has the following attributes Name Name Value Description String Name of the value Used to match a value document function name Element The actual value to be passed to the smart content The ContentFolder element has the following attributes Name ID Sample 1 lt Contents gt lt Content ID 01 Introduction gt lt Value Name Object Value Three trees gt lt Content gt lt Content ID 01 Firmenbildung gt lt Content gt lt Content ID 02 Handelsregister gt lt Content gt lt Contents gt Sample 2 lt Contents gt lt ContentFolder ID User Guide gt lt Contents gt Profile Description String The name without path of the folder containing Smart Contents Allows you to define and to set a profile for the document 36 officeatwork API Syntax lt Profil Where Is gt Content The Profile element has the following attributes Value Description Where String The field to be used to match the comparison value passed in the Is attribute Is String The value to be compare
20. Profile 30 35 ProtectionType 30 31 ReplaceExisting 31 44 SaveAsLocation 31 43 ServerProperties 41 ShowCustomDialog 30 33 ShowDocumentWizard 30 33 TemplatelD 30 32 Interaction 18 Files 18 Methode 19 Interface 15 ISO 8859 1 20 84 officeatwork API J Job sharing 22 L Language 30 32 LCID 67 Mail Merge 12 Manuals 7 officeatwork 20 Minute Guide 7 officeatwork API 7 officeatwork Installation Guide 7 officeatwork Master Template Manager 7 officeatwork Output Method Instructions OOMI Guide 7 officeatwork Project Management 7 officeatwork Project Preparation 7 officeatwork sample solutions specifications 7 officeatwork Smart Content Manager 7 officeatwork Smart Template Manager 7 officeatwork Solution Manager 7 officeatwork User Manual 7 MasterProperties 30 36 Methode Interaction 19 Microsoft Office 15 N Number 59 o OLE 13 OSC File 22 OSC fle 18 Output 30 41 P Parameter 49 Password 30 32 Path 61 Placeholders 24 Process 22 Profile 30 35 Programming 22 Project Managers 7 ProtectionType 30 31 LO QMS 15 R ReplaceExisiting 44 ReplaceExisting 31 Return value 27 50 Root Element EditDocument 30 Root Elements 29 CreateDocument 29 S Samples VBA 46 SaveAsLocation 31 43 ServerProperties 41 shortcut file 18 ShowCustomDialog 30 33 ShowDocumentWizard 30 33 Support
21. Templates Description The ComposeHtmlSource function is mainly used to include a picture into an HTML signature template When executed it will copy the picture file defined in the Source path amp file parameter to the destination location defined in the Destination path amp file parameter Optionally you can define a new name for the picture file copied to the destination location Outlook signatures Please make sure you also include a folder that is created for your picture with the exact same name and location of your signature file and subsequently place your picture in this folder This is necessary as otherwise Outlook will not find the picture you have specified in your signature template Syntax ComposeHtmlSource Source path and file Destination path and file Overwrit xisting file Parameter Source path amp file defines the file to copy and its location of origin Destination path amp file defines the location and name of the copied file If you do not include a file name the name of the source file will be used for the file name at the destination location Overwrite existing file Boolean indicating whether to overwrite existing files at destination True will overwrite existing files False will not copy the file from the source if a file at the destination location already exists with the same name Example ComposeHtmlSource GetMasterPropertyValue Organisation LogoSignature
22. landline network price subject to change T 41 0 41 763 16 70 F 41 0 41 763 16 75 mail officeatwork com www officeatwork com Table of Contents About this Manual 5 For whom this book is designed rra 5 What is covered in this ranura 5 What you already should KOG 5 Typographic SSA 5 Heedback a ad teat ats tod dacs cet BANA teler 6 General Beau UEA 6 Help 7 Manuals E eet tas pen ae yA KUDEA 8 Introduction 11 Microsoft Office integration concepts rru 11 Integration via ABAILA 12 Integration via Bookmarks DDE OLE and Co rra 13 officeatwork integration concept ru 15 officeatwork Integration Architecture for Business Applications 17 Overview a RR aaa EN aea es Ole Saabs aa me ld 17 ot sa ee MELT tom RT aha elles tits ic ai 18 EES ee a tl eta OE deals E Rc Em E EE 18 Method ia anells tes ec tes Es A Ec 19 B sics aa i ms ac toma RO anna GG 20 XME P arameter ie EE Aa ele eia Ea E ie EO 21 Recommended integration architecture ru 22 DE A ed ese etanol ton 22 GORO gea usem desem situ daca arar 24 officeatwork ExecuteXML Method 27 A NN 27 Mi o a SEES ERSTES 27 Barata aea id 27 USAIA REETAN 27 XML Parameter structure and conventions 29 A el Cs des 29 A o a aar es atac 29 CreateDocument ae ES P ai and 29 EditDocum nt aera aar nm Roe MATA de o e 0d 30 Instruction Blerhents rieres ar ces RO ec ee ee A ugaz 30 DocumentEulIName a ies sta em ms ROL each Reta 31 Prod e de elite nee 31 AA O 32 Language anre
23. of more decimal places to the right of the decimal point than defined in the format then the number will be rounded to the defined number of decimal places represents a figure It either shows part of a number or nothing If there is a number from the parameter numbers in place of the then this number will be shown If no number within the parameter is available nothing will be shown represents the place of the decimal point The point is replaced by the indicated symbol in the optional parameter FormatDecimalSymbol If the parameter FormatDecimalSymbol is not designated then the decimal point symbol specified in the user s system settings is used Represents the place where separators are used to show numbers in thousands This symbol can be found repeatedly The comma is replaced by the symbol FormatDigitGroupSymbol in the optional parameter If the parameter FormatDigitGroupSymbol is not indicated then the separator to show numbers in thousands as specified in the user s system settings is used NumberDecimalSymbol String Optional Decimal separator showing the place of the decimal point which is formatted in the parameter number If this parameter is not designated then the decimal point symbol specified in the user s system settings is used FormatDecimalSymbol String Optional Decimal separator showing the place of the decimal point which is formatted in the parameter number If this parameter i
24. offer template and the document language is set to German Switzerland 2055 This sample can be found in the officeatwork example solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample ContentFolder osc g 1S0 8859 1 gt lt Language gt 2055 lt Language gt lt TemplatelD gt Offer lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt Contents gt lt ContentFolder ID lt Contents gt lt CreateDocument gt lt Parameters gt Produkteofferte gt 72 officeatwork API CustomFields This sample OSC file shows how to create a document and set values of custom fields The template used is the Master Template_Custom Fields_Master Properties template and the document language is set to English UK 2057 This sample can be found in our officeatwork example solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample CustomFields osc lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt Language gt 2057 lt Language gt lt TemplateID gt Master Template Custom Fields Master Properties lt TemplateID gt lt ShowDocumentWizard gt 1 lt ShowDocumentWizard gt lt MasterProperties gt lt MasterProperty IDName Cu
25. shortcut 62 officeatwork API Translate Example 1 INCLUDEPICTURE Path Images ProductA jpg Example 2 INCLUDEPICTURE Path AppData Signature jpg Example 3 INCLUDEPICTURE Path SImages Value ProductImage ImageA jpg Available The Translate function is available in the following Templates and Contents Word MasterTemplate Word SmartTemplate Word SmartContent Excel Templates Signature Templates Description The Translate function returns a translation of a given label Syntax Translate Label LCID Parameters The function Translate consists of the following parameters Name Type Description Label String Label of which the appropriate translation is to be returned LCID String Optional LCID the language in which the translation should be added as long as it differs from the chosen document language and is defined as fixed language Chapter Appendix 63 Value A list of the LCIDs is recorded in the appendix Example 1 The positioning is Translate Doc Right Example 2 The English term is Translate Doc Right 2057 Available The Value function is available in the following Templates and Contents Word MasterTemplate Word SmartTemplate Word SmartContent Excel Templates Signature Templates Description This function inserts a va
26. 046 2070 1094 Chapter Appendix 69 Language Punjabi Pakistan Quecha Bolivia Quecha Ecuador Quecha Peru Rhaeto Romanic Romanian Romanian Moldava Russian Russian Moldava Sami Lappish Sanskrit Sepedi Serbian Cyrillic Serbian Latin Sindhi India Sindhi Pakistan Singhalese Sri Lanka Slovak Slovenian Somali Sorbian Spanish Spain Modern Sort Spanish Spain Traditional Sort Spanish Argentina Spanish Bolivia Spanish Chile Spanish Colombia Spanish Costa Rica Spanish Dominican Republic Spanish Ecuador Spanish El Salvador Spanish Guatemala Spanish Honduras Spanish Latin America Spanish Mexico Spanish Nicaragua Spanish Panama Spanish Paraguay 2118 1131 2155 3179 1047 1048 2072 1049 2073 1083 1103 1132 3098 2074 1113 2137 1115 1051 1060 1143 1070 3082 1034 11274 16394 13322 9226 5130 7178 12298 17418 4106 18442 58378 2058 19466 6154 15370 Language Spanish Peru Spanish Puerto Rico Spanish United States Spanish Uruguay Spanish Venezuela Sutu Swahili Swedish Swedish Finland Syriac Tajik Tamazight Arabic Tamazight Latin Tamil Tatar Telugu Thai Tibetan Bhutan Tibetan People s Republic of China Tigrigna Eritrea Tigrigna Ethiopia Tsonga Tswana Turkish Turkmen Uighur China Ukrainian Urdu Urdu India Uzbek Cyrillic Uzbek Latin Venda Vietnamese Welsh
27. 1185094343750537 ShowDialog 0 gt lt Output gt lt CloseDocument gt 1 lt CloseDocument gt lt CreateDocument gt lt Parameters gt Recipient This sample OSC file shows how to create a document and set its recipient information The template used is the Letter template and the document language is set to English UK 2057 This sample can be found in our officeatwork example solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample Recipient osc lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt Language gt 2057 lt Language gt lt TemplateID gt Letter lt TemplateID gt lt ShowDocumentWizard gt 1 lt ShowDocumentWizard gt lt MasterProperties gt lt MasterProperty IDName Recipient gt lt Field Name CompleteAddress Value Muster AG Marketing Mrs Jolanda Smith Matten 12 1111 Musterlingen gt lt Field Name Company Value Muster AG gt lt Field Name Department Value Marketing gt lt Field Name FullName Value Mrs Jolanda Smith gt lt Field Name AddressStreet Value Matten 12 gt lt Field Name AddressZIP Value 1111 gt lt Field Name AdressCity Value Musterlingen gt lt Field Name Telephone Value 41 0 44 444 4444 gt lt Field Name EMail Value jolanda smith examplesolution com gt
28. 58 officeatwork API InsertContent Example 1 InsertBreak PageBreak Example 2 InsertBreak SectionBreakNextPage Example 3 InsertBreak SectionBreakNextPage Protected Available The Avaliable function is available in the following Templates and Contents Word SmartTemplate Word SmartContent Description This function inserts contents which are referred to by their names The insertion is executed by an external interface This happens while inserting contents or during the addition of Smart Templates Syntax InsertContent Name String LCID String Parameters The function InsertContent consists of the following parameters Name Type Description Name String Name of the content which is to be inserted This can be executed in three different ways Alternative 1 Just the file name officeatwork searches for the content in the current template solution and inserts it Alternative 2 Complete path with file name The indicated content is inserted Alternative 3 System variable or officeatwork shortcut with offset path and file name officeatwork clears the system variable or the officeatwork shortcut and inserts the content Chapter Appendix 59 Number LCID String Optional LCID the language in which the content is to be inserted as long as it differs from the chosen document language and is defined as fixed language A list of the LCID
29. TOPDIRECTORY FAVORITES lt Benutzer gt Desktop lt Benutzer gt Favoriten FONTS HISTORY Windows Fonts lt Benutzer gt Lokale Einstell Verlauf INTERNET_CACHE lt Benutzer gt Lokale Einstell Temp Internet Files LOCALAPPDATA lt Benutzer gt Lokale Einstell Anwendungsdaten MYPICTURES NETHOOD Eigene Bilder lt Benutzer gt Netzwerkumgebung OFFICEATWORK PROGRAMFILES amp officeatwork PERSONAL PRINTHOOD Eigene Dateien lt Benutzer gt Druckumgebung PROFILE Benutzerprofil PROGRAMFILES PROGRAMFILESCOMMON C Programme C Programme Gemeinsame Dateien PROGRAMS RECENT Startmenu Programme lt Benutzer gt Recent SENDTO STARTMENU STARTUP lt Benutzer gt SendTo lt Benutzer gt Startmen Startmen Programme Autostart 66 officeatwork API Yo Shortcut Yo SYSTEM TEMP TEMPLATES WINDOWS Destination GetSystemDirectory TEMP lt Benutzer gt Vorlagen GetWindowsDirectory Chapter Appendix 67 LCID s Language Afrikaans South Africa Albanian Albania Amharic Ethiopia Arabic Saudi Arabia Arabic Algeria Arabic Bahrain Arabic Egypt Arabic Iraq Arabic Jordan Arabic Kuwait Arabic Lebanon Arabic Libya Arabic Morocco Arabic Oman Arabic Qatar Arabic Syria Arabic Tunisia Arabic U A E Arabic Yemen Armenian Armenia Assamese Azeri Cyrillic Azeri Latin Basque Belarusian Bengali
30. ail The Save element has the following attributes Name UID ShowDialog Path FileName Description String Represents the UID of the desired officeatwork save variant String Indicates if the save dialogue should be presented to the user during the save process The value 1 will show the dialog while the value 0 will suppress the dialogue String Path for the file to be saved to String File name to be used for the new file Chapter XML Parameter structure and conventions 43 ReplaceExisting String You can define if an existing file shall be replaced with the new one The value 1 will replace any existing file while the value 0 will not save the new file if a file already exists at the same destination location Sample 1 lt Output gt lt Print UID 64756436753645756 ShowDialog 1 gt lt Output gt Sample 2 lt Output gt lt Send UID 576867876875676546 ShowEmail 1 FileName Report pd f gt lt Output gt Sample 3 lt Output gt lt Save UID 345345685746547546775 ShowDialog 1 Path C Reports FileName Report pdf ReplaceExisting 1 gt lt Output gt SaveAsLocation Allows you to define the location where an active document shall be saved Syntax lt SaveAsLocation gt lt SaveAsLocation gt Content The content of the SaveAsLocation element is a path and file name Sample lt SaveAsLocation gt DESKTOP Invoice 5968463 doc lt SaveAsLocation gt
31. ailed Sample lt Successful gt 1 lt Successful gt Returns the ID of the currently active officeatwork solution Sample lt Solution gt examplecom lt Solution gt Returns the ID of the chosen template Sample lt TemplateID gt Letter lt TemplateID gt Returns the path of the chosen template Sample lt TemplatePath gt C myTemplates lt Templa tePath gt Returns the filename of the chosen template Sample lt TemplateFilename gt Letter owt lt Templat eFilename gt Returns the filename including the path of the chosen template Sample lt TemplateFullname gt C officeatwork Solutions MySolution MasterTemplates Letter owt lt TemplateFullname gt Chapter officeatwork TemplateChooser Method 51 Sample lt xml version 1 0 encoding ISO 8859 1 gt lt Results gt lt Successful gt 1 lt Successful gt lt Solution gt examplesolutioncom lt Solution gt lt TemplateID gt Letter lt TemplateID gt lt TemplatePath gt C officeatwork Solutions MySolution MasterTemplates lt TemplatePath gt lt TemplateFilename gt Letter owt lt TemplateFilename gt lt TemplateFullname gt C officeatwork Solutions MySolution MasterTemplates Letter owt lt TemplateFullname gt lt Results gt Appendix 54 officeatwork API Document Functions ComposeHtmlSource Available The ComposeHtmlSource function is available in the following Templates and Contents Signature
32. amp _ lt Value Name Beschreibung Value Karton 1000 Stk Tischset gt amp _ lt Value Name Farbe Value blau rot gt 8 lt Value Name Preis Value 123 45 gt amp _ lt Content gt amp _ lt Content ID Sample with values amp _ LCID 2057 Bookmark Text InsertionMethod 0 gt amp c lt Value Name Beschreibung Value Karton 1000 Stk Tischset gt amp _ lt Value Name Farbe Value blau rot gt 8 lt Value Name Preis Value 123 45 gt amp _ lt Content gt amp _ lt Contents gt lParam lParam amp _ lt CreateDocument gt amp _ lt Parameters gt Set lOawAPI New oawAPI API If 10awAPI ExecuteXML lParam 1 Then MsgBox Dokument wurde erstellt Else MsgBox Dokument konnte nicht erstellt werden End If Set lOavAPI Nothing End Sub Letter This code sample shows how to create a document based on the letter template The document language is set to German Switzerland 2055 78 officeatwork API Sub OfficeatworkApiSample Dim lOavAPI As OavAPI API Dim lParam As String lParam lt Parameters gt amp _ lt CreateDocument gt amp _ lt Language gt amp _ 2055 amp _ lt Language gt amp _ lt TemplateID gt amp _ Letter amp _ lt TemplateID gt amp _ lt ShowDocumentWizard gt amp _ TSE lt ShowDocumentWizard gt amp _ lt CreateDocument gt
33. ceExisting gt 1 lt ReplaceExisting gt lt CloseDocument gt 1 lt CloseDocument gt lt Contents gt lt Content ID 02 Handelsregister gt lt Content gt lt Content ID 04 Rechtstr ger gt lt Content gt lt Contents gt lt CreateDocument gt lt Parameters gt I I I I Multiple Recipients This sample OSC file shows how to create a document with multiple recipients Please note that the first two recipients are marked for printing and that the second recipient will be the active recipient selected in the document wizard and displayed on the document The template used is the Letter template and the document language is set to English UK 2057 This sample can be found in our officeatwork example solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample Multiple Recipients osc 74 officeatwork API lt xml version 1 0 e lt Parameters gt lt CreateDocument gt ncoding 1S0 8859 1 gt lt Language gt 2057 lt Language gt lt TemplateID gt Letter lt TemplateID gt lt ShowDocumentWizard gt 1 lt ShowDocumentWizard gt lt MasterProperties gt lt MasterProp lt Field lt Field Address Street City gt Field Field Field ield Field Field Field Field ield ield lt MasterPro lt MasterProp lt Field NRA AKA AKA A A A A A 1 Address Street City
34. cument gt lt Parameters gt Instruction Elements The following instruction elements are available DocumentFullName ProtectionType Password Language TemplatelD ShowDocumentWizard ShowCustomDialog Contents Profile MasterProperties DocumentVariables CustomDocumentProperty BuiltInDocumentProperties Bookmarks Output Chapter XML Parameter structure and conventions 31 SaveAsLocation CloseDocument ReplaceExisting DocumentFullName Allows you to define the name and path of an existing document to edit This element only works within an EditDocument root element If this tag is missing within the EditDocument root element the complete EditDocument element within your XML parameter will be ignored Syntax lt DocumentFullName gt lt DocumentFullName gt Content The content complete file and path name of an existing document Sample lt Document FullName gt Documents Report2006 doc lt DocumentFullName gt ProtectionType Allows you to set a protection of a specific type for your document This element is optional Syntax lt ProtectionType gt lt ProtectionType gt Content Value representing the type of protection you want to apply to your document Currently two ProtectionType values are allowed 1 stands for no protection 2 stands for forms protection Sample Language Tag lt ProtectionType gt 2 lt ProtectionType gt 32
35. cumentWizard gt 0 lt ShowDocumentWizard gt a lt CreateDocument gt amp lt Parameters gt Set lOawAPI New oawAPI API f 10awAPI ExecuteXML lParam 1 Then MsgBox successfully created document Else MsgBox the document could not be created End If Set lOavAPI Nothing End Sub In this sample lParam holds the XML parameter passed to officeatwork using the ExecuteXML function of officeatwork 22 officeatwork API The template ID could be replaced with any other template ID available within your officeatwork solution This way your business application could request any specific template If no Template ID is passed lt TemplatelD gt lt TemplatelD gt the user will be prompted with the Template Chooser to choose a template that shall be used to create a new document Recommended integration architecture Overview Based on many different architectures we observed that we clearly favour one specific architecture for many reasons This architecture uses a mixture of the two available interaction concepts The business application uses an OSC File as a template as a base to generate a new OSC File During this process it replaces placeholders within the OSC Template File representing business application values with the proper values The OSC Template File may also contain specific business application instructions like loops or counters The processed template is then processed by officeatwork
36. d in the field defined in the Where attribute Default behaviour If the Profile attributes are missing or the Profile element is omitted in your XML Parameter the default behaviour during a creation of a new document will use the user s default profile during the process of creating a document If the user has no default profile the first profile will be used If the user has no profile no profile will be used Sample Profile tag lt Profile Where IDName Is Miller Daniela gt MasterProperties Allows you to set officeatwork specific Master Properties in your document Syntax lt MasterProperties gt lt MasterProperty IDName Where Is gt lt Field Name Value gt lt MasterProperty gt lt MasterProperties gt Content The MasterProperties element has the following sub elements Name Description MasterProperty Element This element represents an individual officeatwork Master Property The MasterProperty element has the following attributes and sub elements Chapter XML Parameter structure and conventions 37 Name Description IDName String The IDName of the Master Property Where String The field to be used to match the comparison value passed in the Is attribute If omitted the default Master Property entry is selected Is String The value to be compared in the field defined in the Where attribute If omitted the default Master Property entry is selected Field Ele
37. e 12 03 2004 gt amp _ lt DocumentVariable Name MeetingPlace Value Room C324 gt amp _ lt DocumentVariables gt amp _ lt CustomDocumentProperties gt amp _ lt CustomDocumentProperty Name Preis Karton _SX12_H4 Value 23 00 gt 8 lt CustomDocumentProperty Name Preis Schlauch_L3 Value 12 50 gt amp _ lt CustomDocumentProperties gt amp _ lt BuiltInDocumentProperties gt amp _ lt BuiltInDocumentProperty Name Author Value Peter Muster gt amp _ lt BuiltInDocumentProperty Name Subject Value Offerte Gartenbau gt amp _ lt BuiltInDocumentProperties gt amp _ lt Bookmarks gt amp _ lt Bookmark Name Preis Schraube _3d6 Value 0 25 gt 8 lt Bookmark Name Preis Mutter 3d5 Value 0 10 gt amp _ lt Bookmarks gt lParam lParam amp _ lt CreateDocument gt amp _ lt Parameters gt Chapter XML Parameter structure and conventions 47 Set lOawAPI New oawAPI API If lOawAPI ExecuteXML 1Param 1 Then MsgBox successfully created document Else MsgBox the document could not be created End If Set lOavAPI Nothing End Sub 49 CHAPTER 7 officeatwork TemplateChooser Method Introduction The officeatwork TemplateChooser method is an officeatwork API function that allows you to use the officeatwork Template Chooser When called it will present the Template Chooser to the user and
38. ead of executing the officeatwork API So make sure your web servers have a MIME type application osc for the extension osc defined ay Ll OSC file officeatwork template document Figure 10 business application office integration concept officeatwork shortcut file Please note that there is an equivalent method called ExecuteXML which can be passed the same XML information enclosed in the Parameters tag officeatwork can also be triggered by calling specific officeatwork methods All available methods will be discussed in a later chapter Ei Ll a LL Li XML Ed business data officeatwork template document application Figure 11 business application office integration concept via officeatwork specific method The code sample shows how to call an officeatwork method within a VBA environment 20 officeatwork API Sub CreateLetter Dim lOavAPI As OavAPI API Dim lParam As String lParam lt xml version 1 0 encoding ISO 8859 1 gt lParam lParam amp lt Parameters gt lParam lParam amp lt CreateDocument gt lParam lParam amp lt TemplateID gt Letter lt TemplateID gt lParam lParam amp lt CreateDocument gt lParam lParam 8 lt Parameters gt Set lOawAPI New oawAPI API f 10awAPI ExecuteXML lParam 1 Then MsgBox successfully created document Else MsgBox the document could not be created End If Set 10awAPI Nothing End Sub
39. ent property Chapter XML Parameter structure and conventions 39 lt CustomDocument Properties gt The CustomDocumentProperty element has the following attributes Name Description Name String The name of the Word custom document property Value String The value to be allocated to the Word custom document property Sample lt CustomDocument Property Name Price Rarton SX12 H4 Value 23 00 gt lt CustomDocumentProperty Name Price Tube L3 Value 12 50 gt lt CustomDocumentProperties gt BuiltinDocumentProperties Allows you to set the value of Word built in document properties Syntax lt BuiltInDocumentProperties gt lt BuiltInDocumentProperty Name Value gt lt BuiltInDocumentProperties gt Content The BuiltInDocumentProperties element has the following sub elements Name Description BuiltInDocumentProperty Element This element represents an individual Word built in document property The BuiltInDocumentProperty element has the following attributes Name Description Name String The name ofthe Word built in document property Value String The value to be allocated to the Word built in document property List of modifiable built in document properties Title Subject 40 officeatwork API Author Keywords Category Comments Manager Company Sample lt BuiltInDocumentProperties gt lt BuiltInDocumentProperty Name Author Value Ha
40. fic office template The business application then directly manipulates that document by using VBA Visual Basic for Applications or any other supported programming language In this process it first generates a new document from the template and then writes the 14 officeatwork API business data directly into it It depends on the depth of the integration whether the document is presented to the user or processed for output directly by the application DDE Dynamic Data Exchange is a technology for communication between multiple applications under Microsoft Windows A common use of DDE was for custom developed applications to control off the shelf software For example a custom in house application might use DDE to open a Microsoft Excel spreadsheet and fill it with data by opening a DDE conversation with Excel and sending it DDE commands Today however one could also use the Excel object model with OLE Automation part of COM o NB Fa business data Microsoft document application Office ze E modified template Figure 5 business application office integration concept via bookmarks DDE OLE and Co Pros Highly flexible as the full object model of the office applications are available to manipulate Standardised interface between many different applications with the potential of reusing the knowledge gained in such an integration DDE OLE Cons Direct dependency on the Office application version and its
41. fore has a sound knowledge of Microsoft Word 83 Index ete Administrators 7 API 7 API function 27 API Function TemplateChooser 49 Architecture Recommended integration architecture 22 Architectures officeatwork overview 17 B Bookmarks 13 40 44 BuildInDocumentProperties 30 BuiltInDocumentProperties 39 CloseDocument 31 43 ComposeHtmlSource 54 Concat 55 concepts officeatwork integration 15 Concepts Microsoft Office integration 11 Contents 30 34 CreateDocument 29 CRM 11 15 CustomDocumentProperties 38 CustomDocumentProperty 30 D DDE 13 Debugging 23 Definitios 22 Design 22 Developers 7 API 7 officeatwork API 7 officeatwork Developer Manual 7 DMS 11 DocumentFullName 30 31 DocumentVariables 30 37 Download manuals 7 Dynamic Data Exchange 14 E EditDocument 30 EFP 11 Encoding 20 ERP 15 ExecuteXML 27 Return value 27 pis File shortcut file 18 Files Interaction 18 G GetMasterProperty Value 55 A IfO 56 InsertBreak 57 InsertContent 58 Instruction Elements BuiltinDocumentProperties 30 Instruction Elements 30 Bookmaks 40 44 Bookmarks 30 BuiltInDocumentProperties 39 CloseDocument 31 43 Contents 30 34 CustomDocumentProperties 38 CustomDocumentPropertiy 30 DocumentFullName 30 31 DocumentVariables 30 37 Language 30 32 MasterProperties 30 36 Output 30 41 Password 30 32
42. g Value Freundliche Griisse gt lt MasterPropert y gt lt MasterProperties gt DocumentVariables gt Allows you to set Word document variables If the document variable does not exist it will be created by officeatwork 38 officeatwork API lt DocumentVariables gt Syntax lt DocumentVariables gt lt DocumentVariable Name Value gt lt DocumentVariables gt Content The DocumentVariables element has the following sub elements Name Description DocumentVariable Element This element represents an individual Word document variable The DocumentVariable element has the following attributes Name Description Name String The name of the Word document variable Value String The value to be allocated to the Word document variable Sample lt DocumentVariable Name MeetingDate Value 12 03 2004 gt amp _ lt DocumentVariable Name MeetingLocation Value Room C324 gt 6 lt DocumentVariables gt CustomDocumentProperties Allows you to set Word custom document properties If the custom document property does not exist it will be created by officeatwork Syntax lt CustomDocumentProperties gt lt CustomDocumentProperty Name Value gt lt CustomDocumentProperties gt Content The CustomDocumentProperties element has the following sub elements Name Description CustomDocumentProperty Element This element represents an individual Word custom docum
43. isen ipod 32 4 officeatwork API Template oia ERODOGUTOSOTNNUZOrd rra SHONCustomDI alga ta en dens COTTE TIS ee a a ade Number AAE Path iake aba WA AWA RN Bu SEA RUA AEE VBA Samples ui ea is Appendix Glossary Index 83 CHAPTER 1 About this Manual The first chapter contains information regarding the structure of this book as well as its audience For whom this book is designed This book has been written for software developers that want to implement an interface to officeatwork What is covered in this manual This manual illustrates the process of integrating an officeatwork interface in your application It explains all parameters available to the developer It also provides a best praxis architecture on how to implement the officeatwork interface What you already should know You should be familiar with the general use of computers especially with the XML notation Programming knowledge is of advantage Typographic conventions Before reading this guide you should be familiar with the typographic conventions used The following graphic descriptions highlight sections of text with particular significance 6 officeatwork API Formatting Convention Triangle gt Bold Typeface CAPITAL LETTERS KEY KEY Feedback Type of Information Step by step procedure You can follow these instructions to perform a specific task Objects needed for selection such as menus button
44. lication directly manipulates that document by controlling the Mail Merge function of the office application by using VBA Visual Basic for Applications or any other supported programming language In this process it writes the business data to a mail merge compatible file and then opens the template This is when the user returns to finish the document using the mail merge functionality Chapter Introduction 13 EO que Ca business data Microsoft document mail merge application export Office document modified template Figure 3 business application office integration concept via mail merge function Pros Using existing functions reduces effort of integration Cons Duplication of already existing templates Direct dependency on the Office application version and its offered functionality In depth knowledge about the Office Application required Testing for each new Office version is necessary Intensive maintenance The whole integration cycle needs to be done for each business application separately Integration via Bookmarks DDE OLE and Co Typically a static office template like for instance a Letter dot file is imported into the business application The template then gets modified to include bookmarks and other placeholders for the business application data In Business a Application office copy of modified template template template Figure 4 creating a business application speci
45. lt CreateDocument gt lt Language gt 2055 lt Language gt lt TemplateID gt Letter lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt SaveAsLocation gt DESKTOP Letter Version 1 doc lt SaveAsLocation gt lt ReplaceExisting gt 1 lt ReplaceExisting gt lt CloseDocument gt 1 lt CloseDocument gt lt Contents gt lt Content ID 01 Firmenbildung gt lt Content gt lt Content ID 02 Handelsregister gt lt Content gt lt Content ID 03 Firmenrecherche gt lt Content gt lt Content ID 04 Rechtstrager gt lt Content gt lt Content ID 05 Firmenschutz gt lt Content gt lt Contents gt lt CreateDocument gt lt CreateDocument gt lt Language gt 2055 lt Language gt lt TemplateID gt Letter lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt SaveAsLocation gt DESKTOP Letter Version 2 doc lt SaveAsLocation gt lt ReplaceExisting gt 1 lt ReplaceExisting gt lt CloseDocument gt 1 lt CloseDocument gt lt Contents gt lt Content ID 01 Firmenbildung gt lt Content gt lt Content ID 03 Firmenrecherche gt lt Content gt lt Content ID 05 Firmenschutz gt lt Content gt lt Contents gt lt CreateDocument gt lt CreateDocument gt lt Language gt 2055 lt Language gt lt TemplateID gt Letter lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt SaveAsLocation gt DESKTOP Letter Version 3 doc lt SaveAsLocation gt lt Repla
46. lue which is referred to by its name The value is for instance passed on as a parameter of an external interface Syntax Value Name String Default String Parameters The function Value consists of the following parameters Name Type Description Name String Name of the parameters which are provided by the interface Default String Optional The Value which is inserted if the value of the parameter s name is not given This means that if the value of the parameter s name is conveyed as empty then empty will be inserted 64 officeatwork API Example Position Nr Value PositionNr Value Description Value Price Pos Nr Descr to the price of Chapter Appendix 65 File System Variables Shortcut ADMINTOOLS Destination lt Benutzer gt Startmen Programme Verwaltung ALTSTARTUP APPDATA Startup lt Benutzer gt Anwendungsdaten COMMONADMINTOOLS All Users Startmen Programme Verwaltung COMMONALTSTARTUP COMMONAPPDATA Common Startup All Users Anwendungsdaten COMMONDESKTOPDIRECTORY All Users Desktop COMMONDOCUMENTS COMMONFAVORITES COMMONPROGRAMS All Users Dokumente All Users Favoriten All Users Startmen Programme COMMONSTARTMENU COMMONSTARTUP All Users Startmen All Users Startmen Autostart COMMONTEMPLATES COOKIES All Users Vorlagen lt Benutzer gt Cookies DESKTOP lt Desktop gt DESK
47. me Signaturel Where UID Is 2003121817293296325874 gt lt MasterProperty IDName Signature2 Where UID Is 2003121817293296325874 gt lt MasterProperty IDName Recipient gt lt Field Name CompleteAddress Value invoice address gt lt MasterProperty gt lt MasterProperty IDName CustomField gt lt Field Name DocumentType Value translation Invoice gt lt Field Name YourReference Value invoice_ref gt lt Field Name Account Value account_displayname gt lt Field Name Project Value project_displayname gt lt MasterProperty gt lt MasterProperties gt lt Bookmarks gt lt Bookmark Name Subject Value translation no invoice_number gt lt Bookmarks gt lt Contents gt lt Content ID Invoice Summary Title gt lt Content gt LOOP IncidentTotals lt Content ID Invoice Summary Item gt lt Value Name GroupBy incident type Value GroupBy_incident_type gt lt Value Name Sum_total Value Sum_total gt lt Value Name Sum_vat Value Sum_vat gt lt Content gt END LOOP IncidentTotals LOOP InvoiceTotals lt Content ID Invoice Summary Total gt lt Value Name Sum_total_incl vat Value Sum_total_incl_vat gt lt Value Name Sum_total_vat_relevant Value Sum_total_vat_relevant gt lt Value Name Sum_total_vat_irrelevant Value Sum_total_vat_irrelevant gt lt Value Name Sum_vat Value Sum_vat gt l
48. ment This element represents a single Master Property field The Field element has the following attributes Name Description Name String Name of the Master Property Field Value String The actual value to be passed to the Master Property field Sample lt MasterProperties gt lt MasterProperty IDName Organisation Where IDName Is Z rich gt lt MasterProperty IDName Author Where IDName Is Muster Peter gt lt MasterProperty IDName Initiator Where IDName Is Muster Peter gt lt MasterProperty IDName Contactperson Where IDName Is Muster Peter gt lt MasterProperty IDName Signaturel Where IDName Is Muster Peter gt lt MasterProperty IDName Signature2 Where UID Is 2003121817293296325874 lt MasterProperty IDName Recipient gt lt Field Name CompleteAddress Value Muster AG Marketing Frau Jolanda Muster Matten 12 1111 Musterlingen gt lt Field Name Company Value Muster AG gt lt Field Name Department Value Marketing gt lt Field Name FullName Value Frau Jolanda Muster gt lt Field Name AddressStreet Value Matten 12 gt lt Field Name AddressZIP Value 1111 gt lt Field Name AdressCity Value Musterlingen gt lt Field Name Telephone Value 41 0 44 444 4444 gt lt Field Name EMail Value jolanda testerli muster com gt lt Field Name Introduction Value Sehr geehrte Frau Muster gt lt Field Name Closin
49. mple lt TemplateID gt letter lt TemplateID gt ShowDocumentWizard Allows you to define ifthe document wizard will automatically be completed during the document creation process or if it shall halt during that process and present the wizard to the user for manual completion This element only works within a CreatDocument root element Syntax lt ShowDocumentWizard gt lt ShowDocumentWizard gt Content String If the value past equals 1 the wizard will not be completed automatically Instead it will be presented to the user for manual completion If the value past equals 0 the wizard will automatically run through without user interaction All the users default settings apply except automatically set values by the XML Parameter Default behaviour If the ShowDocument Wizard is either missing a value or is completely missing within your XML Parameter the default behaviour during the creation of a new document will present the document wizard to the user for manual completion Sample lt ShowDocumentWizard gt 1 lt ShowDocumentWizard gt ShowCustomDialog Allows you to define if the custom dialogue defined in a Smart Template will automatically be completed during the document creation process or if it shall halt during that process and present the dialogue to the user for manual completion 34 officeatwork API Syntax lt ShowCustomDialog gt lt ShowCustomDialog gt Content String If the value past eq
50. mple solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample Send osc lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt Language gt 2055 lt Language gt lt TemplateID gt Baubewilligung lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt Output gt lt Send UID 2006121210395821292110 ShowEmail 1 Filename Baubewilligung pdf gt lt Output gt lt CloseDocument gt 1 lt CloseDocument gt lt CreateDocument gt lt Parameters gt Chapter Appendix 77 VBA Samples Content This code sample shows how to create a document including numerous contents The template used is the Letter template and the document language is set to German Switzerland 2055 Sub OfficeatworkApiSample Dim lOavAPI As oawAPI API Dim lParam As String lParam lt xml version 1 0 encoding ISO 8859 1 gt lParam lt Parameters gt amp _ lt CreateDocument gt lParam lParam _ lt Language gt amp _ 2055 lt Language gt _ lt TemplateID gt amp _ Letter amp _ lt TemplateID gt amp _ lt ShowDocumentWizard gt amp _ Eli d lt ShowDocumentWizard gt lParam lParam amp _ lt Contents gt amp _ lt Content ID Sample gt amp _ lt Content ID Sample with values gt
51. o French North Africa French Reunion French Senegal French Switzerland French West Indies Frisian Netherlands Fulfulde Nigeria FYRO Macedonian Gaelic Ireland Gaelic Scotland Galician Georgian German Germany German Austria German Liechtenstein German Luxembourg German Switzerland Greek Guarani Paraguay Gujarati Hausa Nigeria Hawaiian United States Hebrew Hindi Hungarian Ibibio Nigeria Icelandic Igbo Nigeria Indonesian 11276 3084 9228 12300 15372 5132 13324 6156 14348 58380 8204 10252 4108 7180 1122 1127 1071 2108 1084 1110 1079 1031 3079 5127 4103 2055 1032 1140 1095 1128 1141 1037 1081 1038 1129 1039 1136 1057 Language Inuktitut Italian Italy Italian Switzerland Japanese Kannada Kanuri Nigeria Kashmiri Kashmiri Arabic Kazakh Khmer Konkani Korean Kyrgyz Cyrillic Lao Latin Latvian Lithuanian Malay Malaysia Malay Brunei Darussalam Malayalam Maltese Manipuri Maori New Zealand Marathi Mongolian Cyrillic Mongolian Mongolian Nepali Nepali India Norwegian Bokmal Norwegian Nynorsk Oriya Oromo Papiamentu Pashto Polish Portuguese Brazil Portuguese Portugal Punjabi 1117 1040 2064 1041 1099 1137 2144 1120 1087 1107 1111 1042 1088 1108 1142 1062 1063 1086 2110 1100 1082 1112 1153 1102 1104 2128 1121 2145 1044 2068 1096 1138 1145 1123 1045 1
52. o root elements available to you The CreateDocument allows you to create a new document All its sub elements instruction elements describe how to specifically create a document If you want to create multiple documents you just add multiple CreateDocument root elements to your XML The second root element is EditDocument As the name already suggests this will allow you to edit an existing document Again all sub elements describe in detail what to edit CreateDocument Syntax lt CreateDocument gt lt CreateDocument gt This element contains sub elements CreateDocument Sample This sample will create a new document based on the letter template 30 officeatwork API lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt TemplateID gt letter lt TemplateID gt lt ShowDocumentWizard gt 1 lt ShowDocumentWizard gt lt CreateDocument gt lt Parameters gt EditDocument Syntax lt EditDocument gt lt EditDocument gt This element contains sub elements EditDocument Sample This sample will open an existing document and change its subject to This is my new subject lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt EditDocument gt lt DocumentFullName gt Documents ExampleLetter doc lt DocumentFullName gt lt Bookmarks gt lt Bookmark Name Subject Value This is my new subject gt lt Bookmarks gt lt EditDo
53. offered functionality In depth knowledge about the Office application required Testing for each new Office version is necessary Duplication of already existing templates Intensive maintenance The whole integration cycle needs to be done for each business application separately Enhancement in functionality often requires re programming of the interface Limited to reduced function set offered by server applications DDE OLE All involved applications need to be running for this integration concept to work DDE OLE Chapter Introduction 15 officeatwork integration concept officeatwork is a flexible link between Microsoft Office and your business applications Personal and enterprise information can be automated and directly used in your Office documents Your office templates can be directly linked to your business applications like ERP CRM QMS SharePoint DMS etc by using the officeatwork XML API interface It is no longer necessary to duplicate templates officeatwork templates business applications with linked templates A officeatwork Microsoft a Microsoft CMS gt d Office Figure 6 officeatwork integration concept The main benefit of the officeatwork integration architecture is the fact that no longer copies of templates need to be imported into your business application Instead your business application can link to existing office templates using standard XML language In this proce
54. officeatwork API Password Allows you to set a password for your document The document will not be protected only by setting a password You also need to set a protection type to activate the document protection for your document The password element is optional If you include the ProtectionType element but omit the Password element the document will be protected with no empty password Syntax lt Password gt lt Password gt Content The password you want to apply to your document Sample lt Password gt myPassword lt Password gt Language lt Language gt 2055 lt Language gt TemplatelD Allows you to set the document language Syntax lt Language gt lt Language gt Content Language ID LCID You can find a list of available Language ID s in the Appendix of this manual Sample Allows you to define the template that should be used to create a new document This element only works within the CreateDocument root element Syntax lt TemplateID gt lt TemplateID gt Chapter XML Parameter structure and conventions 33 Content A file name of a template It is also possible to add the path to the file name Without a path the first template with the defined file name that is found within the available template roots will be used to create a new document If the content is left empty the user will be prompted to choose a template manually with the Template Chooser dialogue Sa
55. oft Office officeatwork data is fetched from your business application and retrieved into your office document This option is mostly used to fetch Address Information from for example your ERP or CRM system as well as user information from for example your Active Directory The other direction is from your Business application to officeatwork Pe Ll u srl Za ERP officeatwork Figure 9 Business application interacting with officeatwork Here the starting point is your business application Your business application can be extended so that it can create documents in Microsoft Office using officeatwork 18 officeatwork API functionality It does this by sending standardised XML formatted instructions to officeatwork A common example for this option is for instance the creation of a quote based on the information held within your ERP system This second option is where the officeatwork API comes into action It is designed to enable your business applications to communicate in a standardised and flexible way with officeatwork via XML XML is a widely accepted technology and recommended to be used to communicate between systems This book only covers the API integration option All variations of the first integration option are explained in the officeatwork Director Manual Interaction concepts officeatwork offers two very similar ways for you to create documents via the officeatwork API The parameters of the two ways are
56. onal content Should for instance the Translation Doc Phone only be visible if the contanct person has a phone assigned to him then the IF function can be used to specifiy that condition Syntax If Test TrueValue FalseValue Parameter Test Logical test like A B or 1 gt 2 or GetMasterPropertyValue Company Email TrueValue Return value if Test equals True FalseValue Return value if Test equals False Chapter Appendix 57 Example IF GetMasterPropertyValue Company EmailAddress2 GetMasterPropertyValue Company EmailAddress2 Available The InsertBreak function is available in the following Templates and Contents Word SmartTemplate Word SmartContent Description This function implements a change of column page chapter etc Syntax InsertBreak Type String ProtectionType String 1 Parameters The function InsertBreak consists of the following parameters Name Type Description Type String Describes the style of change List of possible parameters ColumnBreak LineBreak PageBreak SectionBreakContinuous SectionBreakEvenPage SectionBreakNextPage SectionBreakOddPage ProtectionType String Only applicable with SectionBreak types Describes the kind of protection setting applicable Is the Protection Type omitted then the section will be inserted without any protection List of possible parameters Unprotected Protected
57. pters published not yet published The manuals can be downloaded from the officeatwork website www officeatwork com Download 8 officeatwork API Support Support for officeatwork products can be obtained from your officeatwork project partner or from the producer itself The producer officeatwork AG offers the following support options Hotline 0900 566 088 CHF 3 50 per minute on the Swiss landline network Talk directly to our qualified officeatwork specialists For personal support we recommend that you use our online support tool The tool can be used without having to install it The link to download the tool can be found on our website at www officeatwork com gt Support Premium support Send your questions by e mail to premiumsupport officeatwork com or call us at 41 0 41 763 16 73 officeatwork AG Your questions will be answered by our officeatwork specialists with priority If desired your officeatwork solution will be analysed by our officeatwork specialists If necessary changes to your solution can be made at your request For more information check out our website at www officeatwork com gt Support E Mail support free Send us your questions by e mail to support officeatwork com This support is free Your questions will be answered by our support department on average within 5 to 10 working days For more information check out our website at www officeatwork com gt Support 1 Inciden
58. rameters gt 27 CHAPTER 5 officeatwork ExecuteXML Method Introduction The officeatwork ExecuteXML method is the main API function that officeatwork offers Its XML Parameter allows you to interact with miscellaneous officeatwork functions When calling the officeatwork ExecuteXML method remember to include the officeatwork ActiveX API Component named officeatwork API in your project Otherwise the methods are not available to you The component is located in the Common Folder within your officeatwork application directory The filename of the component is oawAPl exe Syntax ExecuteXML pParam String Long Parameters The function ExecuteXML has the following parameters Name Description pParam String An XML string containing officeatwork specific instructions The string has to be structured in a predefined format Return value The ExecuteXML function returns the following values Type Description Long can have one of the following values 1 representing a successful execution this means all instructions defined in the parameter were successfully executed 0 representing the value of an unsuccessful execution 28 officeatwork API this means one or many instructions were not successfully executed 29 CHAPTER 6 XML Parameter structure and conventions Introduction The XML parameter conforms with the following XML structure convention Root Elements There are tw
59. rnal use as well as an original to be sent to the customer In the end the documents are closed without saving The whole process is fully automated and requires no interaction from the user lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt LOOP Documents lt CreateDocument gt lt TemplateID gt Letter lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt Chapter officeatwork Integration Architecture for Business Applications 25 lt Language gt account_lcid lt Language gt lt MasterProperties gt lt MasterProperty IDName Company Where IDName Is officeatwork organisation _name gt lt MasterProperty IDName Contactperson Where UID Is 2003121817293296325874 gt lt MasterProperty IDName Signaturel Where UID Is 2003121817293296325874 gt lt MasterProperty IDName Signature2 Where UID Is 2003121817293296325874 gt lt MasterProperty IDName Recipient gt lt Field Name CompleteAddress Value invoice address gt lt MasterProperty gt lt MasterProperty IDName CustomField gt lt Field Name DocumentType Value translation invoice gt lt Field Name YourReference Value invoice ref gt lt Field Name Account Value account_displayname gt lt Field Name Project Value project_displayname gt lt MasterProperty gt lt MasterProperties gt lt Bookmarks gt lt Bookmark Name Subject Value transla
60. rry Smith gt lt BuiltInDocumentProperty Name Subject Value Offer B763Gk gt lt BuiltInDocumentProperties gt Bookmarks lt Bookmarks gt lt Bookmark Name size Allows you to set the content of Word bookmarks Syntax lt Bookmarks gt lt Bookmark Name Value gt lt Bookmarks gt Content The Bookmarks element has the following sub elements Name Description Bookmark Element This element represents an individual Word bookmark The Bookmark element has the following attributes Name Description Name String The name ofthe Word bookmark Value Element The value to be allocated to the Word bookmark Sample Value 347 5 gt lt Bookmark Name orientation Value tall gt lt Bookmarks gt Chapter XML Parameter structure and conventions 41 ServerProperties lt ServerProperties gt Allows you to set the content of ServerProperties in Office 2007 Documents Syntax lt ServerProperties gt lt ServerProperty Name Value gt lt ServerProperties gt Content The ServerProperties element has the following sub elements Name Description ServerProperty Element This element represents an individual server property The Serverproperty element has the following attributes Name Description Name String The name of the server property Value Element The value to be allocated to the server property Sample lt ServerProperty Name
61. s or items ina list Key legends on the keyboard For example SHIFT CTRL or ALT Key combinations which must be pressed at the same time are marked with Examples CTRL P or ALT F4 We are very interested in your opinion We kindly ask you to present us with any feedback you have as well as with any other aspects of officeatwork by writing an e mail to feedback officeatwork com General contact details officeatwork AG Bundesplatz 12 6300 Zug Switzerland H 0900 566 088 Hotline CHF 3 50 per minute on the Swiss landline network Price subject to change T 41 0 41 763 16 70 F 41 0 41 763 16 75 E Mail mail officeatwork com Internet www officeatwork com CHAPTER 2 Help This chapter explains the different help options available Manuals officeatwork manuals are divided into the following categories Manuals for Users officeatwork 20 Minute Guide officeatwork User Manual officeatwork Smart Template Manager Manual officeatwork Smart Content Manager Manual Manuals for Administrators a officeatwork Installation Guide officeatwork Output Method Instructions OOMI Guide officeatwork Master Template Manager Manual officeatwork Solution Manager Manual Manuals for Project Managers officeatwork Project Manager Manual officeatwork Project Preparation Manual officeatwork sample solution specifications Manuals for Developers officeatwork API some cha
62. s is recorded in the appendix Example 1 T amp C Article 1 InsertContent T amp cArt1 Example 2 T amp C Article 1 InsertContent J Content CopyrightNote owc Example 3 T amp C Article 1 InsertContent SDocuments ISOCertificate owc Example 4 T amp C Article 1 InsertContent T amp cArt1 2057 Available The Number function is available in the following Templates and Contents Word SmartTemplate Word SmartContent Description This function formats a numeric value Careful when you format a number which includes separators that designate decimal points or numbers in thousands and these do not match the system settings of the user it is not possible for you to use these numbers for calculations with fields in Microsoft Syntax Number Number String Format String NumberDecimalSymbol String FormatDecimalSymbol String FormatDigitGroupSymbol String 60 officeatwork API Parameters The function Number consists of the following parameters Name Type Number String Format String Description Number which needs to be formatted Format in which the number is to be transformed 0 represents a digit It either shows a specific number or a zero If there is a number from the parameter numbers in place of the 0 then this number will be shown If no number within the parameter is available a zero will be shown If the number consists
63. s not designated then the decimal point symbol specified in the user s system settings is used FormatDigitGroupSymbol String Optional Separator specifying numbers in thousands which is used in the parameter format If the parameter Chapter Appendix 61 Path FormatDigitGroupSymbol is not designated then the symbol separating numbers in thousands specified in the user s system settings is used Example 1 The following example formats the number 123456 789 into 123 456 79 Price Number 123456 789 0 00 Example 2 The following example formats the number which is calculated according to the formula Value UnitPrice Price Number Value UnitPrice 0 00 mos ITO Available The Path function is available in the following Templates and Contents Word SmartTemplate Word SmartContent Description This function changes a path which contains system variables or officeatwork Solutions shortcuts Careful If this formula is used within a field then all single backslashes will automatically be replaced by double backslashes as this is the standard notation for paths on Word fields Syntax Path Path String Parameters The function Path consists of the following parameters Name Type Description Path String Path which contains a System Variable e g ProgramFiles or an officeatwork Solution
64. ss the business application compiles its requirements and data into an XML string and passes that onto officeatwork officeatwork will then process the XML automatically Your business application does not need to understand how to create a document in Microsoft Office we O Ea business XML officeatwork Microsoft document application data Offic template Figure 7 officeatwork business application integration concept 16 officeatwork API Pros No duplication of already existing templates No direct dependency on the Office application version and its offered functionality No in depth knowledge about the Office application required No testing for each new Office version is necessary Maintenance friendly no reprogramming for new templates or data attributes necessary Business application can share same templates no separate integration necessary No re programming of the interface to enhance functionality Cons Limited to functionality offered by officeatwork CHAPTER 4 officeatwork Integration Architecture for Business Applications Overview officeatwork offers two directions of integrating with your business application The first is from officeatwork to your business application al Business L Application E 1 IR Gi officeatwork ERP Figure 8 officeatwork interacting with a business application Here the starting point is officeatwork From within Micros
65. stomField gt lt Field Name External Value EX3 gt lt Field Name Ref Value K 4587 322 gt lt Field Name No Value 83672 gt lt MasterProperty gt lt MasterProperties gt lt CreateDocument gt lt Parameters gt Letter This sample OSC file shows how to create a document based on the Letter template The document language is set to English UK 2057 This sample can be found in our officeatwork example solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample Letter osc lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt Language gt 2057 lt Language gt lt TemplateID gt Letter lt TemplateID gt lt ShowDocumentWizard gt 1 lt ShowDocumentWizard gt lt CreateDocument gt lt Parameters gt Multiple Documents This sample OSC file shows how to create multiple documents in one go The template used is the letter template and the document language is set to German Switzerland 2055 This sample can be found in our officeatwork example solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample Multiple Documents osc Chapter Appendix 73 lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt
66. t You receive telephone support per incidence at a fixed price Per single incident you will receive telephone support until the conclusion of your incident has been reached For more information check out our website at www officeatwork com gt Support 5 Incidents 5 incidents are the equivalent to five single incidents With the 5 incident package you will receive five incidents for the price of four For more information check out our website at www officeatwork com gt Support Unlimited support per month You are provided with unlimited telephone support for one full month at a fixed price For more information check out our website at www officeatwork com gt Support Manuals You can download the most up to date manuals at www officeatwork com gt Download Chapter Help 9 Newsletter officeatwork News is good news with added value officeatwork News informs you regularly about relevant topics regarding corporate office automation The qualified news keeps you up to date and helps you to increase the practical value of Microsoft Office For more information and registration check out our website at www officeatwork com gt Support CHAPTER 3 Introduction There are many reasons why business applications want to integrate with Microsoft Office Here are a few reasons Re use of existing Templates Re use of existing Corporate Design Re use of user skills for editing documents In order
67. t Content gt END LOOP InvoiceTotals lt Content ID lt Content ID lt Content ID Invoice Payment Instructions gt lt Content gt Invoice Marketing gt lt Content gt Invoice Journal Title gt lt Content gt 26 officeatwork API LOOP Journal lt Content ID Invoice Journal Subtitle gt lt Value Name incident_type Value incident_type gt lt Content gt LOOP Journalltens lt Content ID Invoice Journal Item gt lt Value Name accounting date Value accounting date gt lt Value Name subject Value subject gt lt Value Name unit_ price Value unit_price gt lt Value Name quantity Value quantity gt lt Value Name unit Value unit gt lt Value Name total without discount Value total_without_discount gt lt Value Name discount_pct Value discount_pct gt lt Value Name discount description Value discount_description gt lt Value Name discount Value discount gt lt Value Name total Value total gt lt Value Name vat Value vat gt lt Content gt END LOOP Journalltens END LOOP Journal lt Contents gt lt Output gt lt Print UID 2007010510574768320716 ShowDialog 0 gt lt Print UID 2004543664767678679898 ShowDialog 0 gt lt Output gt lt CloseDocument gt 1 lt CloseDocument gt lt CreateDocument gt END LOOP Documents lt Pa
68. the same just the way officeatwork is involved differs The first way is by calling a method and passing it XML parameters as an argument the other is by saving the same arguments to a file and then sending the OS an Open command to execute that file This way officeatwork gets the file and processes it hence the API gets triggered Files officeatwork API can be triggered by opening a file with the extension osc officeatwork shortcut file The content of that file must be in XML format and must follow the XML schemes of the officeatwork API The following sample shows a simple example of such a osc file lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt TemplateID gt letter lt TemplateID gt lt CreateDocument gt lt Parameters gt The structure of the XML API will be covered in a later chapter At this point it is important to know that a simple XML formatted file will allow you to interact with officeatwork Simply double click your OSC file and officeatwork will open the file and execute the XML formatted instructions Chapter officeatwork Integration Architecture for Business Applications 19 Method Please note that when you are working with a web server that serves html pages containing links to OSC files you must add a MIME type for the OSC files on that web server Otherwise clicking on links pointing to OSC files will open the OSC file in your web browser inst
69. tion no invoice_number gt lt Bookmarks gt lt Contents gt lt Content ID Invoice Summary Title gt lt Content gt LOOP IncidentTotals lt Content ID Invoice Summary Item gt lt Value Name GroupBy incident type Value GroupBy_incident_type gt lt Value Name Sum_total Value Sum_total gt lt Value Name Sum_vat Value Sum_vat gt lt Content gt END LOOP IncidentTotals LOOP InvoiceTotals lt Content ID Invoice Summary Total gt lt Value Name Sum_total_incl vat Value Sum total incl vat gt lt Value Name Sum total vat relevant Value Sum total vat relevant o lt Value Name Sum total vat irrelevant Value Sum total vat irrelevant o lt Value Name Sum vat Value Sum_vat gt lt Content gt END LOOP InvoiceTotals lt Content ID Invoice Accounting Details gt lt Content gt lt Contents gt lt Output gt lt Print UID 2007010510574768320716 ShowDialog 0 gt lt Output gt lt CloseDocument gt 1 lt CloseDocument gt lt CreateDocument gt lt CreateDocument gt lt TemplateID gt Letter lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt Language gt account_lcid lt Language gt lt MasterProperties gt lt MasterProperty IDName Company Where IDName Is officeatwork organisation name gt lt MasterProperty IDName Contactperson Where UID Is 2003121817293296325874 gt lt MasterProperty IDNa
70. to better understand the challenges you face when integrating Microsoft Office into business applications we will analyse a few of the most common concepts After that we will have a look at the officeatwork approach of bringing together your business application with Microsoft Office Microsoft Office integration concepts Microsoft Office and business applications do not always concur Basically all applications need specific and specially created templates which in turn generate many different copied templates Additionally it is seldom the case that Microsoft Office data can be accessed from business applications such as ERP CRM DMS etc These discrepancies mean that the necessary information needs to be recorded again and again That is an absolute waste of time and also creates opportunities for error 12 officeatwork API Microsoft Office templates business applications with copied templates ERP CRM Satan dde a y SES sae Figure 1 Typical Microsoft Office integration architecture Integration via Mail Merge Typically a static office template like for instance a Letter dot file is imported into the business application The template is then modified to include mail merge fields as placeholders for the business application data Business wv Application office copy of modified template template template Figure 2 creating a business application specific office template The business app
71. uals 1 the dialogue will not be completed automatically Instead it will be presented to the user for manual completion If the value past equals 0 the dialogue will automatically run through without user interaction All the default settings apply except automatically set values by the XML Parameter Default behaviour If the ShowCustomDialog is either missing a value or is completely missing within your XML Parameter the default behaviour during a creation of a new document will present the custom dialogue to the user for manual completion Sample lt ShowCustomDialog gt 1 lt ShowCustomDialog gt Contents Allows you to add Smart Contents to your document You can choose between adding single contents or all contents in a specific folder You can also pass values along with your contents Syntax lt Contents gt lt Content ID gt lt Value Name Value gt lt Content gt lt ContentFolder ID gt lt Contents gt Content The Contents element can contain the following sub elements Name Description Content Element This element represents an individual content ContentFolder Element This element represents a folder most probably containing numerous Smart Content files The Content element has the following attributes and sub elements Name Description Chapter XML Parameter structure and conventions 35 ID LCID Value String The filename of the Smart Content String
72. ue 1 gt perty gt erty IDName Recipient gt ame IDName Value Sample Recipient 3 gt ame CompleteAddress Value Sample No 3 ame Company Value Company Sample 3 gt ame Department Value Department Sample 3 gt ame FullName Value FullName Sample 3 gt ame AddressStreet Value AddressStreet Sample 3 gt ame AddressZIP Value 3333 gt ame AdressCity Value AdressCity Sample 3 gt ame Telephone Value 33 0 33 333 3333 gt ame EMail Value 3 3 examplesolution com gt ame RecipientPrint Value 0 gt ame RecipientActive Value 0 gt perty gt lt MasterProperties gt lt CreateDocument gt lt Parameters gt Print This sample OSC file shows how to create a document and print it using an officeatwork output variant The template used is the Baubewilligung template and the document language is set to German Switzerland 2055 This sample can be found in our officeatwork example solution which is part of the officeatwork application installer The sample file is located in the folder Examples OSC Files of the officeatwork solution and is named Sample Print osc Chapter Appendix 75 lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt CreateDocument gt lt Language gt 2055 lt Language gt lt TemplateID gt Baubewilligung lt TemplateID gt lt ShowDocumentWizard gt 0 lt ShowDocumentWizard gt lt Output gt lt Print UID 200301071
73. ues gt Chapter XML Parameter structure and conventions 45 Content The Values element has the following sub elements Name Value Description Element This element represents an individual Value The Value element has the following attributes Name Name Value Sample lt Values gt lt Value Name size Value 347 5 gt lt Value Name orientation Value tall gt lt Values gt Description String The name corresponding to the name used in the Value document function Element The value to be allocated to the appropriate Value document function 46 officeatwork API VBA Sample The following example is written in VBA and creates a new document based on the letter template Sub OfficeatworkApiSample Dim 10awAPI As oawAPI API Dim lParam As String lParam lt Parameters gt amp _ lt CreateDocument gt lParam lParam _ lt Language gt _ 2055 amp _ lt Language gt amp _ lt TemplateID gt amp _ Letter amp _ lt TemplateID gt amp _ I lParam lParam _ lt SaveAsLocation gt amp _ C MyDocuments Document002 doc amp _ lt SaveAsLocation gt amp _ lt ReplaceExisting gt amp _ Malt LG lt ReplaceExisting gt amp _ lt CloseDocument gt amp _ NOTE lt CloseDocument gt lParam lParam amp _ lt Contents gt amp _ lt Content ID Karton_SX12_H4 gt amp _ lt Content ID
74. will ask him to pick a template Depending on the user s rights the selection of the templates could be limited The return value contains the corresponding TemplatelD of the template that the user chose When calling the officeatwork TemplateChooser method remember to include the officeatwork ActiveX API Component named officeatwork API in your project Otherwise the methods are not available to you The component is located in the Common Folder within your officeatwork application directory The filename of the component is oawAPl exe Syntax TemplateChooser pParam String String Sample lt xml version 1 0 encoding ISO 8859 1 gt lt Parameters gt lt Parameters gt Parameter The function TemplateChooser has the following parameters Name Description pParam String An XML string containing officeatwork specific instructions The string has to be structured in a predefined format Root elements The XML parameter has no root elements 50 officeatwork API Return value The TemplateChooser function returns the following values Type String Content Description An XML string with various elements within the lt Results gt element The lt Results gt element has the following sub elements Name Successful Solution TemplateID TemplatePath TemplateFilename TemplateFullname Description Indicates whether the function has been successfully completed 1 successful 0 f

Download Pdf Manuals

image

Related Search

Related Contents

USER MANUAL  平成21年3月期 有価証券報告書  カタログ  コイスミ学習デスク  : Raymarine - Multifunktionsdisplay e7/e7D, at www.SVB.de    Registered No. 4263359 0608 Page 1 Customer Guide to    EMC 2004/108  入札説明書 独立行政法人都市再生機構東日本賃貸住宅本部のUR賃貸  

Copyright © All rights reserved.
Failed to retrieve file