Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

DocX.XML 236KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578
  1. <?xml version="1.0"?>
  2. <doc>
  3. <assembly>
  4. <name>DocX</name>
  5. </assembly>
  6. <members>
  7. <member name="T:Novacode.Border">
  8. <summary>
  9. Represents a border of a table or table cell
  10. Added by lckuiper @ 20101117
  11. </summary>
  12. </member>
  13. <member name="T:Novacode.Axis">
  14. <summary>
  15. Axis base class
  16. </summary>
  17. </member>
  18. <member name="P:Novacode.Axis.Id">
  19. <summary>
  20. ID of this Axis
  21. </summary>
  22. </member>
  23. <member name="P:Novacode.Axis.IsVisible">
  24. <summary>
  25. Return true if this axis is visible
  26. </summary>
  27. </member>
  28. <member name="P:Novacode.Axis.Xml">
  29. <summary>
  30. Axis xml element
  31. </summary>
  32. </member>
  33. <member name="T:Novacode.CategoryAxis">
  34. <summary>
  35. Represents Category Axes
  36. </summary>
  37. </member>
  38. <member name="T:Novacode.ValueAxis">
  39. <summary>
  40. Represents Values Axes
  41. </summary>
  42. </member>
  43. <member name="T:Novacode.BarChart">
  44. <summary>
  45. This element contains the 2-D bar or column series on this chart.
  46. 21.2.2.16 barChart (Bar Charts)
  47. </summary>
  48. </member>
  49. <member name="P:Novacode.BarChart.BarDirection">
  50. <summary>
  51. Specifies the possible directions for a bar chart.
  52. </summary>
  53. </member>
  54. <member name="P:Novacode.BarChart.BarGrouping">
  55. <summary>
  56. Specifies the possible groupings for a bar chart.
  57. </summary>
  58. </member>
  59. <member name="P:Novacode.BarChart.GapWidth">
  60. <summary>
  61. Specifies that its contents contain a percentage between 0% and 500%.
  62. </summary>
  63. </member>
  64. <member name="T:Novacode.BarDirection">
  65. <summary>
  66. Specifies the possible directions for a bar chart.
  67. 21.2.3.3 ST_BarDir (Bar Direction)
  68. </summary>
  69. </member>
  70. <member name="T:Novacode.BarGrouping">
  71. <summary>
  72. Specifies the possible groupings for a bar chart.
  73. 21.2.3.4 ST_BarGrouping (Bar Grouping)
  74. </summary>
  75. </member>
  76. <member name="T:Novacode.Chart">
  77. <summary>
  78. Represents every Chart in this document.
  79. </summary>
  80. </member>
  81. <member name="P:Novacode.Chart.Xml">
  82. <summary>
  83. The xml representation of this chart
  84. </summary>
  85. </member>
  86. <member name="P:Novacode.Chart.Series">
  87. <summary>
  88. Chart's series
  89. </summary>
  90. </member>
  91. <member name="P:Novacode.Chart.MaxSeriesCount">
  92. <summary>
  93. Return maximum count of series
  94. </summary>
  95. </member>
  96. <member name="M:Novacode.Chart.AddSeries(Novacode.Series)">
  97. <summary>
  98. Add a new series to this chart
  99. </summary>
  100. </member>
  101. <member name="P:Novacode.Chart.Legend">
  102. <summary>
  103. Chart's legend.
  104. If legend doesn't exist property is null.
  105. </summary>
  106. </member>
  107. <member name="M:Novacode.Chart.AddLegend">
  108. <summary>
  109. Add standart legend to the chart.
  110. </summary>
  111. </member>
  112. <member name="M:Novacode.Chart.AddLegend(Novacode.ChartLegendPosition,System.Boolean)">
  113. <summary>
  114. Add a legend with parameters to the chart.
  115. </summary>
  116. </member>
  117. <member name="M:Novacode.Chart.RemoveLegend">
  118. <summary>
  119. Remove the legend from the chart.
  120. </summary>
  121. </member>
  122. <member name="P:Novacode.Chart.CategoryAxis">
  123. <summary>
  124. Represents the category axis
  125. </summary>
  126. </member>
  127. <member name="P:Novacode.Chart.ValueAxis">
  128. <summary>
  129. Represents the values axis
  130. </summary>
  131. </member>
  132. <member name="P:Novacode.Chart.IsAxisExist">
  133. <summary>
  134. Represents existing the axis
  135. </summary>
  136. </member>
  137. <member name="P:Novacode.Chart.View3D">
  138. <summary>
  139. Get or set 3D view for this chart
  140. </summary>
  141. </member>
  142. <member name="P:Novacode.Chart.DisplayBlanksAs">
  143. <summary>
  144. Specifies how blank cells shall be plotted on a chart
  145. </summary>
  146. </member>
  147. <member name="M:Novacode.Chart.#ctor">
  148. <summary>
  149. Create an Chart for this document
  150. </summary>
  151. </member>
  152. <member name="M:Novacode.Chart.CreateChartXml">
  153. <summary>
  154. An abstract method which creates the current chart xml
  155. </summary>
  156. </member>
  157. <member name="T:Novacode.Series">
  158. <summary>
  159. Represents a chart series
  160. </summary>
  161. </member>
  162. <member name="P:Novacode.Series.Xml">
  163. <summary>
  164. Series xml element
  165. </summary>
  166. </member>
  167. <member name="T:Novacode.ChartLegend">
  168. <summary>
  169. Represents a chart legend
  170. More: http://msdn.microsoft.com/ru-ru/library/cc845123.aspx
  171. </summary>
  172. </member>
  173. <member name="P:Novacode.ChartLegend.Xml">
  174. <summary>
  175. Legend xml element
  176. </summary>
  177. </member>
  178. <member name="P:Novacode.ChartLegend.Overlay">
  179. <summary>
  180. Specifies that other chart elements shall be allowed to overlap this chart element
  181. </summary>
  182. </member>
  183. <member name="P:Novacode.ChartLegend.Position">
  184. <summary>
  185. Specifies the possible positions for a legend
  186. </summary>
  187. </member>
  188. <member name="M:Novacode.ChartLegend.GetOverlayValue(System.Boolean)">
  189. <summary>
  190. ECMA-376, page 3840
  191. 21.2.2.132 overlay (Overlay)
  192. </summary>
  193. </member>
  194. <member name="T:Novacode.ChartLegendPosition">
  195. <summary>
  196. Specifies the possible positions for a legend.
  197. 21.2.3.24 ST_LegendPos (Legend Position)
  198. </summary>
  199. </member>
  200. <member name="T:Novacode.DisplayBlanksAs">
  201. <summary>
  202. Specifies the possible ways to display blanks.
  203. 21.2.3.10 ST_DispBlanksAs (Display Blanks As)
  204. </summary>
  205. </member>
  206. <member name="T:Novacode.LineChart">
  207. <summary>
  208. This element contains the 2-D line chart series.
  209. 21.2.2.97 lineChart (Line Charts)
  210. </summary>
  211. </member>
  212. <member name="P:Novacode.LineChart.Grouping">
  213. <summary>
  214. Specifies the kind of grouping for a column, line, or area chart.
  215. </summary>
  216. </member>
  217. <member name="T:Novacode.Grouping">
  218. <summary>
  219. Specifies the kind of grouping for a column, line, or area chart.
  220. 21.2.2.76 grouping (Grouping)
  221. </summary>
  222. </member>
  223. <member name="T:Novacode.PieChart">
  224. <summary>
  225. This element contains the 2-D pie series for this chart.
  226. 21.2.2.141 pieChart (Pie Charts)
  227. </summary>
  228. </member>
  229. <member name="M:Novacode.XElementHelpers.GetValueToEnum``1(System.Xml.Linq.XElement)">
  230. <summary>
  231. Get value from XElement and convert it to enum
  232. </summary>
  233. <typeparam name="T">Enum type</typeparam>
  234. </member>
  235. <member name="M:Novacode.XElementHelpers.SetValueFromEnum``1(System.Xml.Linq.XElement,``0)">
  236. <summary>
  237. Convert value to xml string and set it into XElement
  238. </summary>
  239. <typeparam name="T">Enum type</typeparam>
  240. </member>
  241. <member name="M:Novacode.XElementHelpers.GetXmlNameFromEnum``1(``0)">
  242. <summary>
  243. Return xml string for this value
  244. </summary>
  245. <typeparam name="T">Enum type</typeparam>
  246. </member>
  247. <member name="T:Novacode.XmlNameAttribute">
  248. <summary>
  249. This attribute applied to enum's fields for definition their's real xml names in DocX file.
  250. </summary>
  251. <example>
  252. public enum MyEnum
  253. {
  254. [XmlName("one")] // This means, that xml element has 'val="one"'
  255. ValueOne,
  256. [XmlName("two")] // This means, that xml element has 'val="two"'
  257. ValueTwo
  258. }
  259. </example>
  260. </member>
  261. <member name="P:Novacode.XmlNameAttribute.XmlName">
  262. <summary>
  263. Real xml name
  264. </summary>
  265. </member>
  266. <member name="P:Novacode.Container.Paragraphs">
  267. <summary>
  268. Returns a list of all Paragraphs inside this container.
  269. </summary>
  270. <example>
  271. <code>
  272. Load a document.
  273. using (DocX document = DocX.Load(@"Test.docx"))
  274. {
  275. // All Paragraphs in this document.
  276. <![CDATA[ List<Paragraph> ]]> documentParagraphs = document.Paragraphs;
  277. // Make sure this document contains at least one Table.
  278. if (document.Tables.Count() > 0)
  279. {
  280. // Get the first Table in this document.
  281. Table t = document.Tables[0];
  282. // All Paragraphs in this Table.
  283. <![CDATA[ List<Paragraph> ]]> tableParagraphs = t.Paragraphs;
  284. // Make sure this Table contains at least one Row.
  285. if (t.Rows.Count() > 0)
  286. {
  287. // Get the first Row in this document.
  288. Row r = t.Rows[0];
  289. // All Paragraphs in this Row.
  290. <![CDATA[ List<Paragraph> ]]> rowParagraphs = r.Paragraphs;
  291. // Make sure this Row contains at least one Cell.
  292. if (r.Cells.Count() > 0)
  293. {
  294. // Get the first Cell in this document.
  295. Cell c = r.Cells[0];
  296. // All Paragraphs in this Cell.
  297. <![CDATA[ List<Paragraph> ]]> cellParagraphs = c.Paragraphs;
  298. }
  299. }
  300. }
  301. // Save all changes to this document.
  302. document.Save();
  303. }// Release this document from memory.
  304. </code>
  305. </example>
  306. </member>
  307. <member name="M:Novacode.Container.RemoveParagraphAt(System.Int32)">
  308. <summary>
  309. Removes paragraph at specified position
  310. </summary>
  311. <param name="index">Index of paragraph to remove</param>
  312. <returns>True if removed</returns>
  313. </member>
  314. <member name="M:Novacode.Container.RemoveParagraph(Novacode.Paragraph)">
  315. <summary>
  316. Removes paragraph
  317. </summary>
  318. <param name="p">Paragraph to remove</param>
  319. <returns>True if removed</returns>
  320. </member>
  321. <member name="M:Novacode.Container.SetDirection(Novacode.Direction)">
  322. <summary>
  323. Sets the Direction of content.
  324. </summary>
  325. <param name="direction">Direction either LeftToRight or RightToLeft</param>
  326. <example>
  327. Set the Direction of content in a Paragraph to RightToLeft.
  328. <code>
  329. // Load a document.
  330. using (DocX document = DocX.Load(@"Test.docx"))
  331. {
  332. // Get the first Paragraph from this document.
  333. Paragraph p = document.InsertParagraph();
  334. // Set the Direction of this Paragraph.
  335. p.Direction = Direction.RightToLeft;
  336. // Make sure the document contains at lest one Table.
  337. if (document.Tables.Count() > 0)
  338. {
  339. // Get the first Table from this document.
  340. Table t = document.Tables[0];
  341. /*
  342. * Set the direction of the entire Table.
  343. * Note: The same function is available at the Row and Cell level.
  344. */
  345. t.SetDirection(Direction.RightToLeft);
  346. }
  347. // Save all changes to this document.
  348. document.Save();
  349. }// Release this document from memory.
  350. </code>
  351. </example>
  352. </member>
  353. <member name="M:Novacode.Container.FindUniqueByPattern(System.String,System.Text.RegularExpressions.RegexOptions)">
  354. <summary>
  355. Find all unique instances of the given Regex Pattern,
  356. returning the list of the unique strings found
  357. </summary>
  358. <param name="pattern"></param>
  359. <param name="options"></param>
  360. <returns></returns>
  361. </member>
  362. <member name="M:Novacode.Container.ReplaceText(System.String,System.Func{System.String,System.String},System.Boolean,System.Text.RegularExpressions.RegexOptions,Novacode.Formatting,Novacode.Formatting,Novacode.MatchFormattingOptions)">
  363. <summary>
  364. </summary>
  365. <param name="searchValue">Value to find</param>
  366. <param name="regexMatchHandler">A Func that accepts the matching regex search group value and passes it to this to return the replacement string</param>
  367. <param name="trackChanges">Enable trackchanges</param>
  368. <param name="options">Regex options</param>
  369. <param name="newFormatting"></param>
  370. <param name="matchFormatting"></param>
  371. <param name="formattingOptions"></param>
  372. </member>
  373. <member name="M:Novacode.Container.RemoveTextInGivenFormat(Novacode.Formatting,Novacode.MatchFormattingOptions)">
  374. <summary>
  375. Removes all items with required formatting
  376. </summary>
  377. <returns>Numer of texts removed</returns>
  378. </member>
  379. <member name="M:Novacode.ExtensionsHeadings.HasFlag(System.Enum,System.Enum)">
  380. <summary>
  381. From: http://stackoverflow.com/questions/4108828/generic-extension-method-to-see-if-an-enum-contains-a-flag
  382. Check to see if a flags enumeration has a specific flag set.
  383. </summary>
  384. <param name="variable">Flags enumeration to check</param>
  385. <param name="value">Flag to check for</param>
  386. <returns></returns>
  387. </member>
  388. <member name="T:Novacode.Font">
  389. <summary>
  390. Represents a font family
  391. </summary>
  392. </member>
  393. <member name="M:Novacode.Font.#ctor(System.String)">
  394. <summary>
  395. Initializes a new instance of <see cref="T:Novacode.Font" />
  396. </summary>
  397. <param name="name">The name of the font family</param>
  398. </member>
  399. <member name="P:Novacode.Font.Name">
  400. <summary>
  401. The name of the font family
  402. </summary>
  403. </member>
  404. <member name="M:Novacode.Font.ToString">
  405. <summary>
  406. Returns a string representation of an object
  407. </summary>
  408. <returns>The name of the font family</returns>
  409. </member>
  410. <member name="P:Novacode.CustomProperty.Name">
  411. <summary>
  412. The name of this CustomProperty.
  413. </summary>
  414. </member>
  415. <member name="P:Novacode.CustomProperty.Value">
  416. <summary>
  417. The value of this CustomProperty.
  418. </summary>
  419. </member>
  420. <member name="M:Novacode.CustomProperty.#ctor(System.String,System.String)">
  421. <summary>
  422. Create a new CustomProperty to hold a string.
  423. </summary>
  424. <param name="name">The name of this CustomProperty.</param>
  425. <param name="value">The value of this CustomProperty.</param>
  426. </member>
  427. <member name="M:Novacode.CustomProperty.#ctor(System.String,System.Int32)">
  428. <summary>
  429. Create a new CustomProperty to hold an int.
  430. </summary>
  431. <param name="name">The name of this CustomProperty.</param>
  432. <param name="value">The value of this CustomProperty.</param>
  433. </member>
  434. <member name="M:Novacode.CustomProperty.#ctor(System.String,System.Double)">
  435. <summary>
  436. Create a new CustomProperty to hold a double.
  437. </summary>
  438. <param name="name">The name of this CustomProperty.</param>
  439. <param name="value">The value of this CustomProperty.</param>
  440. </member>
  441. <member name="M:Novacode.CustomProperty.#ctor(System.String,System.DateTime)">
  442. <summary>
  443. Create a new CustomProperty to hold a DateTime.
  444. </summary>
  445. <param name="name">The name of this CustomProperty.</param>
  446. <param name="value">The value of this CustomProperty.</param>
  447. </member>
  448. <member name="M:Novacode.CustomProperty.#ctor(System.String,System.Boolean)">
  449. <summary>
  450. Create a new CustomProperty to hold a bool.
  451. </summary>
  452. <param name="name">The name of this CustomProperty.</param>
  453. <param name="value">The value of this CustomProperty.</param>
  454. </member>
  455. <member name="T:Novacode.DocProperty">
  456. <summary>
  457. Represents a field of type document property. This field displays the value stored in a custom property.
  458. </summary>
  459. </member>
  460. <member name="P:Novacode.DocProperty.Name">
  461. <summary>
  462. The custom property to display.
  463. </summary>
  464. </member>
  465. <member name="M:Novacode.HelperFunctions.ContainsEveryChildOf(System.Xml.Linq.XElement,System.Xml.Linq.XElement,Novacode.MatchFormattingOptions)">
  466. <summary>
  467. Checks whether 'toCheck' has all children that 'desired' has and values of 'val' attributes are the same
  468. </summary>
  469. <param name="desired"></param>
  470. <param name="toCheck"></param>
  471. <param name="fo">Matching options whether check if desired attributes are inder a, or a has exactly and only these attributes as b has.</param>
  472. <returns></returns>
  473. </member>
  474. <member name="M:Novacode.HelperFunctions.AddDefaultNumberingXml(System.IO.Packaging.Package)">
  475. <summary>
  476. If this document does not contain a /word/numbering.xml add the default one generated by Microsoft Word
  477. when the default bullet, numbered and multilevel lists are added to a blank document
  478. </summary>
  479. <param name="package"></param>
  480. <returns></returns>
  481. </member>
  482. <member name="M:Novacode.HelperFunctions.AddDefaultStylesXml(System.IO.Packaging.Package)">
  483. <summary>
  484. If this document does not contain a /word/styles.xml add the default one generated by Microsoft Word.
  485. </summary>
  486. <param name="package"></param>
  487. <returns></returns>
  488. </member>
  489. <member name="M:Novacode.HelperFunctions.CreateTableCell(System.Double)">
  490. <summary>
  491. Create and return a cell of a table
  492. </summary>
  493. </member>
  494. <member name="M:Novacode.HelperFunctions.IsSameFile(System.IO.Stream,System.IO.Stream)">
  495. <!--
  496. Bug found and fixed by trnilse. To see the change,
  497. please compare this release to the previous release using TFS compare.
  498. -->
  499. </member>
  500. <member name="T:Novacode.Hyperlink">
  501. <summary>
  502. Represents a Hyperlink in a document.
  503. </summary>
  504. </member>
  505. <member name="M:Novacode.Hyperlink.Remove">
  506. <summary>
  507. Remove a Hyperlink from this Paragraph only.
  508. </summary>
  509. <example>
  510. <code>
  511. // Create a document.
  512. using (DocX document = DocX.Create(@"Test.docx"))
  513. {
  514. // Add a hyperlink to this document.
  515. Hyperlink h = document.AddHyperlink("link", new Uri("http://www.google.com"));
  516. // Add a Paragraph to this document and insert the hyperlink
  517. Paragraph p1 = document.InsertParagraph();
  518. p1.Append("This is a cool ").AppendHyperlink(h).Append(" .");
  519. /*
  520. * Remove the hyperlink from this Paragraph only.
  521. * Note a reference to the hyperlink will still exist in the document and it can thus be reused.
  522. */
  523. p1.Hyperlinks[0].Remove();
  524. // Add a new Paragraph to this document and reuse the hyperlink h.
  525. Paragraph p2 = document.InsertParagraph();
  526. p2.Append("This is the same cool ").AppendHyperlink(h).Append(" .");
  527. document.Save();
  528. }// Release this document from memory.
  529. </code>
  530. </example>
  531. </member>
  532. <member name="P:Novacode.Hyperlink.Text">
  533. <summary>
  534. Change the Text of a Hyperlink.
  535. </summary>
  536. <example>
  537. Change the Text of a Hyperlink.
  538. <code>
  539. // Create a document.
  540. using (DocX document = DocX.Load(@"Test.docx"))
  541. {
  542. // Get all of the hyperlinks in this document
  543. List&lt;Hyperlink&gt; hyperlinks = document.Hyperlinks;
  544. // Change the first hyperlinks text and Uri
  545. Hyperlink h0 = hyperlinks[0];
  546. h0.Text = "DocX";
  547. h0.Uri = new Uri("http://docx.codeplex.com");
  548. // Save this document.
  549. document.Save();
  550. }
  551. </code>
  552. </example>
  553. </member>
  554. <member name="P:Novacode.Hyperlink.Uri">
  555. <summary>
  556. Change the Uri of a Hyperlink.
  557. </summary>
  558. <example>
  559. Change the Uri of a Hyperlink.
  560. <code>
  561. <![CDATA[
  562. // Create a document.
  563. using (DocX document = DocX.Load(@"Test.docx"))
  564. {
  565. // Get all of the hyperlinks in this document
  566. List<Hyperlink> hyperlinks = document.Hyperlinks;
  567. // Change the first hyperlinks text and Uri
  568. Hyperlink h0 = hyperlinks[0];
  569. h0.Text = "DocX";
  570. h0.Uri = new Uri("http://docx.codeplex.com");
  571. // Save this document.
  572. document.Save();
  573. }
  574. ]]>
  575. </code>
  576. </example>
  577. </member>
  578. <member name="T:Novacode.List">
  579. <summary>
  580. Represents a List in a document.
  581. </summary>
  582. </member>
  583. <member name="P:Novacode.List.Items">
  584. <summary>
  585. This is a list of paragraphs that will be added to the document
  586. when the list is inserted into the document.
  587. The paragraph needs a numPr defined to be in this items collection.
  588. </summary>
  589. </member>
  590. <member name="P:Novacode.List.NumId">
  591. <summary>
  592. The numId used to reference the list settings in the numbering.xml
  593. </summary>
  594. </member>
  595. <member name="P:Novacode.List.ListType">
  596. <summary>
  597. The ListItemType (bullet or numbered) of the list.
  598. </summary>
  599. </member>
  600. <member name="M:Novacode.List.AddItem(Novacode.Paragraph)">
  601. <summary>
  602. Adds an item to the list.
  603. </summary>
  604. <param name="paragraph"></param>
  605. <exception cref="T:System.InvalidOperationException">
  606. Throws an InvalidOperationException if the item cannot be added to the list.
  607. </exception>
  608. </member>
  609. <member name="M:Novacode.List.CanAddListItem(Novacode.Paragraph)">
  610. <summary>
  611. Determine if it is able to add the item to the list
  612. </summary>
  613. <param name="paragraph"></param>
  614. <returns>
  615. Return true if AddItem(...) will succeed with the given paragraph.
  616. </returns>
  617. </member>
  618. <member name="M:Novacode.List.GetMaxNumId">
  619. <summary>
  620. Method to determine the last numId for a list element.
  621. Also useful for determining the next numId to use for inserting a new list element into the document.
  622. </summary>
  623. <returns>
  624. 0 if there are no elements in the list already.
  625. Increment the return for the next valid value of a new list element.
  626. </returns>
  627. </member>
  628. <member name="M:Novacode.List.GetMaxAbstractNumId">
  629. <summary>
  630. Method to determine the last abstractNumId for a list element.
  631. Also useful for determining the next abstractNumId to use for inserting a new list element into the document.
  632. </summary>
  633. <returns>
  634. -1 if there are no elements in the list already.
  635. Increment the return for the next valid value of a new list element.
  636. </returns>
  637. </member>
  638. <member name="M:Novacode.List.GetAbstractNum(System.Int32)">
  639. <summary>
  640. Get the abstractNum definition for the given numId
  641. </summary>
  642. <param name="numId">The numId on the pPr element</param>
  643. <returns>XElement representing the requested abstractNum</returns>
  644. </member>
  645. <member name="T:Novacode.PackagePartStream">
  646. <summary>
  647. OpenXML Isolated Storage access is not thread safe.
  648. Use app domain wide lock for writing.
  649. </summary>
  650. </member>
  651. <member name="T:Novacode.TableOfContents">
  652. <summary>
  653. Represents a table of contents in the document
  654. </summary>
  655. </member>
  656. <member name="T:Novacode.DocXElement">
  657. <summary>
  658. All DocX types are derived from DocXElement.
  659. This class contains properties which every element of a DocX must contain.
  660. </summary>
  661. </member>
  662. <member name="P:Novacode.DocXElement.Xml">
  663. <summary>
  664. This is the actual Xml that gives this element substance.
  665. For example, a Paragraphs Xml might look something like the following
  666. <p>
  667. <r>
  668. <t>Hello World!</t>
  669. </r>
  670. </p>
  671. </summary>
  672. </member>
  673. <member name="P:Novacode.DocXElement.Document">
  674. <summary>
  675. This is a reference to the DocX object that this element belongs to.
  676. Every DocX element is connected to a document.
  677. </summary>
  678. </member>
  679. <member name="M:Novacode.DocXElement.#ctor(Novacode.DocX,System.Xml.Linq.XElement)">
  680. <summary>
  681. Store both the document and xml so that they can be accessed by derived types.
  682. </summary>
  683. <param name="document">The document that this element belongs to.</param>
  684. <param name="xml">The Xml that gives this element substance</param>
  685. </member>
  686. <member name="T:Novacode.InsertBeforeOrAfter">
  687. <summary>
  688. This class provides functions for inserting new DocXElements before or after the current DocXElement.
  689. Only certain DocXElements can support these functions without creating invalid documents, at the moment these are Paragraphs and Table.
  690. </summary>
  691. </member>
  692. <member name="T:Novacode.Table">
  693. <summary>
  694. Represents a Table in a document.
  695. </summary>
  696. </member>
  697. <member name="M:Novacode.Table.MergeCellsInColumn(System.Int32,System.Int32,System.Int32)">
  698. <summary>
  699. Merge cells in given column starting with startRow and ending with endRow.
  700. </summary>
  701. <remarks>
  702. Added by arudoy patch: 11608
  703. </remarks>
  704. </member>
  705. <member name="P:Novacode.Table.Paragraphs">
  706. <summary>
  707. Returns a list of all Paragraphs inside this container.
  708. </summary>
  709. </member>
  710. <member name="P:Novacode.Table.Pictures">
  711. <summary>
  712. Returns a list of all Pictures in a Table.
  713. </summary>
  714. <example>
  715. Returns a list of all Pictures in a Table.
  716. <code>
  717. <![CDATA[
  718. // Create a document.
  719. using (DocX document = DocX.Load(@"Test.docx"))
  720. {
  721. // Get the first Table in a document.
  722. Table t = document.Tables[0];
  723. // Get all of the Pictures in this Table.
  724. List<Picture> pictures = t.Pictures;
  725. // Save this document.
  726. document.Save();
  727. }
  728. ]]>
  729. </code>
  730. </example>
  731. </member>
  732. <member name="M:Novacode.Table.SetDirection(Novacode.Direction)">
  733. <summary>
  734. Set the direction of all content in this Table.
  735. </summary>
  736. <param name="direction">(Left to Right) or (Right to Left)</param>
  737. <example>
  738. Set the content direction for all content in a table to RightToLeft.
  739. <code>
  740. // Load a document.
  741. using (DocX document = DocX.Load(@"Test.docx"))
  742. {
  743. // Get the first table in a document.
  744. Table table = document.Tables[0];
  745. // Set the content direction for all content in this table to RightToLeft.
  746. table.SetDirection(Direction.RightToLeft);
  747. // Save all changes made to this document.
  748. document.Save();
  749. }
  750. </code>
  751. </example>
  752. </member>
  753. <member name="P:Novacode.Table.Hyperlinks">
  754. <summary>
  755. Get all of the Hyperlinks in this Table.
  756. </summary>
  757. <example>
  758. Get all of the Hyperlinks in this Table.
  759. <code>
  760. // Create a document.
  761. using (DocX document = DocX.Load(@"Test.docx"))
  762. {
  763. // Get the first Table in this document.
  764. Table t = document.Tables[0];
  765. // Get a list of all Hyperlinks in this Table.
  766. List&lt;Hyperlink&gt; hyperlinks = t.Hyperlinks;
  767. // Save this document.
  768. document.Save();
  769. }
  770. </code>
  771. </example>
  772. </member>
  773. <member name="M:Novacode.Table.SetWidthsPercentage(System.Single[],System.Nullable{System.Single})">
  774. <summary>
  775. Set Table column width by prescribing percent
  776. </summary>
  777. <param name="widthsPercentage">column width % list</param>
  778. <param name="totalWidth">Total table width. Will be calculated if null sent.</param>
  779. </member>
  780. <member name="M:Novacode.Table.GetOrCreate_tblPr">
  781. <summary>
  782. If the tblPr element doesent exist it is created, either way it is returned by this function.
  783. </summary>
  784. <returns>The tblPr element for this Table.</returns>
  785. </member>
  786. <member name="M:Novacode.Table.SetTableCellMargin(Novacode.TableCellMarginType,System.Double)">
  787. <summary>
  788. Set the specified cell margin for the table-level.
  789. </summary>
  790. <param name="type">The side of the cell margin.</param>
  791. <param name="margin">The value for the specified cell margin.</param>
  792. <remarks>More information can be found <see cref="!:http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.tablecellmargindefault.aspx">here</see></remarks>
  793. </member>
  794. <member name="M:Novacode.Table.GetColumnWidth(System.Int32)">
  795. <summary>
  796. Gets the column width for a given column index.
  797. </summary>
  798. <param name="index"></param>
  799. </member>
  800. <member name="M:Novacode.Table.SetColumnWidth(System.Int32,System.Double)">
  801. <summary>
  802. Sets the column width for the given index.
  803. </summary>
  804. <param name="index">Column index</param>
  805. <param name="width">Colum width</param>
  806. </member>
  807. <member name="P:Novacode.Table.ColumnWidths">
  808. <summary>
  809. Gets a list of all column widths for this table.
  810. </summary>
  811. </member>
  812. <member name="P:Novacode.Table.RowCount">
  813. <summary>
  814. Returns the number of rows in this table.
  815. </summary>
  816. </member>
  817. <member name="P:Novacode.Table.ColumnCount">
  818. <summary>
  819. Returns the number of columns in this table.
  820. </summary>
  821. </member>
  822. <member name="P:Novacode.Table.Rows">
  823. <summary>
  824. Returns a list of rows in this table.
  825. </summary>
  826. </member>
  827. <member name="F:Novacode.Table._customTableDesignName">
  828. <summary>
  829. Extra property for Custom Table Style provided by carpfisher - Thanks
  830. </summary>
  831. </member>
  832. <member name="P:Novacode.Table.CustomTableDesignName">
  833. <summary>
  834. Extra property for Custom Table Style provided by carpfisher - Thanks
  835. </summary>
  836. </member>
  837. <member name="F:Novacode.Table._tableCaption">
  838. <summary>
  839. String containing the Table Caption value (the table's Alternate Text Title)
  840. </summary>
  841. </member>
  842. <member name="P:Novacode.Table.TableCaption">
  843. <summary>
  844. Gets or Sets the value of the Table Caption (Alternate Text Title) of this table.
  845. </summary>
  846. </member>
  847. <member name="F:Novacode.Table._tableDescription">
  848. <summary>
  849. String containing the Table Description (the table's Alternate Text Description).
  850. </summary>
  851. </member>
  852. <member name="P:Novacode.Table.TableDescription">
  853. <summary>
  854. Gets or Sets the value of the Table Description (Alternate Text Description) of this table.
  855. </summary>
  856. </member>
  857. <member name="P:Novacode.Table.AutoFit">
  858. <summary>
  859. Auto size this table according to some rule.
  860. </summary>
  861. <remarks>Added by Roger Saele, April 2012. Thank you for your contribution Roger.</remarks>
  862. </member>
  863. <member name="P:Novacode.Table.Design">
  864. <summary>
  865. The design\style to apply to this table.
  866. Patch1. Patch to code for Custom Table Style support by carpfisher
  867. </summary>
  868. <example>
  869. Example code for custom table style usage
  870. <code>
  871. Novacode.DocX document = Novacode.DocX.Load(“DOC01.doc”); // load document with custom table style defined
  872. Novacode.Table t = document.AddTable(2, 2); // adds table
  873. t.CustomTableDesignName = “MyStyle01”; // assigns Custom Table Design style to newly created table
  874. </code>
  875. </example>
  876. </member>
  877. <member name="P:Novacode.Table.Index">
  878. <summary>
  879. Returns the index of this Table.
  880. </summary>
  881. <example>
  882. Replace the first table in this document with a new Table.
  883. <code>
  884. // Load a document into memory.
  885. using (DocX document = DocX.Load(@"Test.docx"))
  886. {
  887. // Get the first Table in this document.
  888. Table t = document.Tables[0];
  889. // Get the character index of Table t in this document.
  890. int index = t.Index;
  891. // Remove Table t.
  892. t.Remove();
  893. // Insert a new Table at the original index of Table t.
  894. Table newTable = document.InsertTable(index, 4, 4);
  895. // Set the design of this new Table, so that we can see it.
  896. newTable.Design = TableDesign.LightShadingAccent1;
  897. // Save all changes made to the document.
  898. document.Save();
  899. } // Release this document from memory.
  900. </code>
  901. </example>
  902. </member>
  903. <member name="M:Novacode.Table.Remove">
  904. <summary>
  905. Remove this Table from this document.
  906. </summary>
  907. <example>
  908. Remove the first Table from this document.
  909. <code>
  910. // Load a document into memory.
  911. using (DocX document = DocX.Load(@"Test.docx"))
  912. {
  913. // Get the first Table in this document.
  914. Table t = d.Tables[0];
  915. // Remove this Table.
  916. t.Remove();
  917. // Save all changes made to the document.
  918. document.Save();
  919. } // Release this document from memory.
  920. </code>
  921. </example>
  922. </member>
  923. <member name="M:Novacode.Table.InsertRow">
  924. <summary>
  925. Insert a row at the end of this table.
  926. </summary>
  927. <example>
  928. <code>
  929. // Load a document.
  930. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  931. {
  932. // Get the first table in this document.
  933. Table table = document.Tables[0];
  934. // Insert a new row at the end of this table.
  935. Row row = table.InsertRow();
  936. // Loop through each cell in this new row.
  937. foreach (Cell c in row.Cells)
  938. {
  939. // Set the text of each new cell to "Hello".
  940. c.Paragraphs[0].InsertText("Hello", false);
  941. }
  942. // Save the document to a new file.
  943. document.SaveAs(@"C:\Example\Test2.docx");
  944. }// Release this document from memory.
  945. </code>
  946. </example>
  947. <returns>A new row.</returns>
  948. </member>
  949. <member name="M:Novacode.Table.InsertRow(Novacode.Row)">
  950. <summary>
  951. Insert a copy of a row at the end of this table.
  952. </summary>
  953. <returns>A new row.</returns>
  954. </member>
  955. <member name="M:Novacode.Table.InsertColumn">
  956. <summary>
  957. Insert a column to the right of a Table.
  958. </summary>
  959. <example>
  960. <code>
  961. // Load a document.
  962. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  963. {
  964. // Get the first Table in this document.
  965. Table table = document.Tables[0];
  966. // Insert a new column to this right of this table.
  967. table.InsertColumn();
  968. // Set the new columns text to "Row no."
  969. table.Rows[0].Cells[table.ColumnCount - 1].Paragraph.InsertText("Row no.", false);
  970. // Loop through each row in the table.
  971. for (int i = 1; i &lt; table.Rows.Count; i++)
  972. {
  973. // The current row.
  974. Row row = table.Rows[i];
  975. // The cell in this row that belongs to the new column.
  976. Cell cell = row.Cells[table.ColumnCount - 1];
  977. // The first Paragraph that this cell houses.
  978. Paragraph p = cell.Paragraphs[0];
  979. // Insert this rows index.
  980. p.InsertText(i.ToString(), false);
  981. }
  982. document.Save();
  983. }// Release this document from memory.
  984. </code>
  985. </example>
  986. </member>
  987. <member name="M:Novacode.Table.RemoveRow">
  988. <summary>
  989. Remove the last row from this Table.
  990. </summary>
  991. <example>
  992. Remove the last row from a Table.
  993. <code>
  994. // Load a document.
  995. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  996. {
  997. // Get the first table in this document.
  998. Table table = document.Tables[0];
  999. // Remove the last row from this table.
  1000. table.RemoveRow();
  1001. // Save the document.
  1002. document.Save();
  1003. }// Release this document from memory.
  1004. </code>
  1005. </example>
  1006. </member>
  1007. <member name="M:Novacode.Table.RemoveRow(System.Int32)">
  1008. <summary>
  1009. Remove a row from this Table.
  1010. </summary>
  1011. <param name="index">The row to remove.</param>
  1012. <example>
  1013. Remove the first row from a Table.
  1014. <code>
  1015. // Load a document.
  1016. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  1017. {
  1018. // Get the first table in this document.
  1019. Table table = document.Tables[0];
  1020. // Remove the first row from this table.
  1021. table.RemoveRow(0);
  1022. // Save the document.
  1023. document.Save();
  1024. }// Release this document from memory.
  1025. </code>
  1026. </example>
  1027. </member>
  1028. <member name="M:Novacode.Table.RemoveColumn">
  1029. <summary>
  1030. Remove the last column for this Table.
  1031. </summary>
  1032. <example>
  1033. Remove the last column from a Table.
  1034. <code>
  1035. // Load a document.
  1036. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  1037. {
  1038. // Get the first table in this document.
  1039. Table table = document.Tables[0];
  1040. // Remove the last column from this table.
  1041. table.RemoveColumn();
  1042. // Save the document.
  1043. document.Save();
  1044. }// Release this document from memory.
  1045. </code>
  1046. </example>
  1047. </member>
  1048. <member name="M:Novacode.Table.RemoveColumn(System.Int32)">
  1049. <summary>
  1050. Remove a column from this Table.
  1051. </summary>
  1052. <param name="index">The column to remove.</param>
  1053. <example>
  1054. Remove the first column from a Table.
  1055. <code>
  1056. // Load a document.
  1057. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  1058. {
  1059. // Get the first table in this document.
  1060. Table table = document.Tables[0];
  1061. // Remove the first column from this table.
  1062. table.RemoveColumn(0);
  1063. // Save the document.
  1064. document.Save();
  1065. }// Release this document from memory.
  1066. </code>
  1067. </example>
  1068. </member>
  1069. <member name="M:Novacode.Table.InsertRow(System.Int32)">
  1070. <summary>
  1071. Insert a row into this table.
  1072. </summary>
  1073. <example>
  1074. <code>
  1075. // Load a document.
  1076. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  1077. {
  1078. // Get the first table in this document.
  1079. Table table = document.Tables[0];
  1080. // Insert a new row at index 1 in this table.
  1081. Row row = table.InsertRow(1);
  1082. // Loop through each cell in this new row.
  1083. foreach (Cell c in row.Cells)
  1084. {
  1085. // Set the text of each new cell to "Hello".
  1086. c.Paragraphs[0].InsertText("Hello", false);
  1087. }
  1088. // Save the document to a new file.
  1089. document.SaveAs(@"C:\Example\Test2.docx");
  1090. }// Release this document from memory.
  1091. </code>
  1092. </example>
  1093. <param name="index">Index to insert row at.</param>
  1094. <returns>A new Row</returns>
  1095. </member>
  1096. <member name="M:Novacode.Table.InsertRow(Novacode.Row,System.Int32)">
  1097. <summary>
  1098. Insert a copy of a row into this table.
  1099. </summary>
  1100. <param name="row">Row to copy and insert.</param>
  1101. <param name="index">Index to insert row at.</param>
  1102. <returns>A new Row</returns>
  1103. </member>
  1104. <member name="M:Novacode.Table.InsertColumn(System.Int32,System.Boolean)">
  1105. <summary>
  1106. Insert a column into a table.
  1107. </summary>
  1108. <param name="index">The index to insert the column at.</param>
  1109. <param name="direction">The side in which you wish to place the colum(True right, false left)</param>
  1110. <example>
  1111. Insert a column to the left of a table.
  1112. <code>
  1113. // Load a document.
  1114. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  1115. {
  1116. // Get the first Table in this document.
  1117. Table table = document.Tables[0];
  1118. // Insert a new column to this left of this table.
  1119. table.InsertColumn(0, false);
  1120. // Set the new columns text to "Row no."
  1121. table.Rows[0].Cells[table.ColumnCount - 1].Paragraph.InsertText("Row no.", false);
  1122. // Loop through each row in the table.
  1123. for (int i = 1; i &lt; table.Rows.Count; i++)
  1124. {
  1125. // The current row.
  1126. Row row = table.Rows[i];
  1127. // The cell in this row that belongs to the new column.
  1128. Cell cell = row.Cells[table.ColumnCount - 1];
  1129. // The first Paragraph that this cell houses.
  1130. Paragraph p = cell.Paragraphs[0];
  1131. // Insert this rows index.
  1132. p.InsertText(i.ToString(), false);
  1133. }
  1134. document.Save();
  1135. }// Release this document from memory.
  1136. </code>
  1137. </example>
  1138. </member>
  1139. <member name="M:Novacode.Table.AddCellToRow(Novacode.Row,System.Xml.Linq.XElement,System.Int32,System.Boolean)">
  1140. <summary>
  1141. Adds a cell to the right or left of a cell
  1142. </summary>
  1143. <param name="row">is the row you are adding</param>
  1144. <param name="cell">is the cell you are adding</param>
  1145. <param name="index">the cell index position you are refferencing from</param>
  1146. <param name="direction">which side of the cell you wish to add cell</param>
  1147. </member>
  1148. <member name="M:Novacode.Table.DeleteAndShiftCellsLeft(System.Int32,System.Int32)">
  1149. <summary>
  1150. Deletes a cell in a row
  1151. </summary>
  1152. <param name="rowIndex">index of the row you want to remove the cell</param>
  1153. <param name="celIndex">index of the cell you want to remove</param>
  1154. </member>
  1155. <member name="M:Novacode.Table.InsertPageBreakBeforeSelf">
  1156. <summary>
  1157. Insert a page break before a Table.
  1158. </summary>
  1159. <example>
  1160. Insert a Table and a Paragraph into a document with a page break between them.
  1161. <code>
  1162. // Create a new document.
  1163. using (DocX document = DocX.Create(@"Test.docx"))
  1164. {
  1165. // Insert a new Paragraph.
  1166. Paragraph p1 = document.InsertParagraph("Paragraph", false);
  1167. // Insert a new Table.
  1168. Table t1 = document.InsertTable(2, 2);
  1169. t1.Design = TableDesign.LightShadingAccent1;
  1170. // Insert a page break before this Table.
  1171. t1.InsertPageBreakBeforeSelf();
  1172. // Save this document.
  1173. document.Save();
  1174. }// Release this document from memory.
  1175. </code>
  1176. </example>
  1177. </member>
  1178. <member name="M:Novacode.Table.InsertPageBreakAfterSelf">
  1179. <summary>
  1180. Insert a page break after a Table.
  1181. </summary>
  1182. <example>
  1183. Insert a Table and a Paragraph into a document with a page break between them.
  1184. <code>
  1185. // Create a new document.
  1186. using (DocX document = DocX.Create(@"Test.docx"))
  1187. {
  1188. // Insert a new Table.
  1189. Table t1 = document.InsertTable(2, 2);
  1190. t1.Design = TableDesign.LightShadingAccent1;
  1191. // Insert a page break after this Table.
  1192. t1.InsertPageBreakAfterSelf();
  1193. // Insert a new Paragraph.
  1194. Paragraph p1 = document.InsertParagraph("Paragraph", false);
  1195. // Save this document.
  1196. document.Save();
  1197. }// Release this document from memory.
  1198. </code>
  1199. </example>
  1200. </member>
  1201. <member name="M:Novacode.Table.InsertTableBeforeSelf(Novacode.Table)">
  1202. <summary>
  1203. Insert a new Table before this Table, this Table can be from this document or another document.
  1204. </summary>
  1205. <param name="t">The Table t to be inserted</param>
  1206. <returns>A new Table inserted before this Table.</returns>
  1207. <example>
  1208. Insert a new Table before this Table.
  1209. <code>
  1210. // Place holder for a Table.
  1211. Table t;
  1212. // Load document a.
  1213. using (DocX documentA = DocX.Load(@"a.docx"))
  1214. {
  1215. // Get the first Table from this document.
  1216. t = documentA.Tables[0];
  1217. }
  1218. // Load document b.
  1219. using (DocX documentB = DocX.Load(@"b.docx"))
  1220. {
  1221. // Get the first Table in document b.
  1222. Table t2 = documentB.Tables[0];
  1223. // Insert the Table from document a before this Table.
  1224. Table newTable = t2.InsertTableBeforeSelf(t);
  1225. // Save all changes made to document b.
  1226. documentB.Save();
  1227. }// Release this document from memory.
  1228. </code>
  1229. </example>
  1230. </member>
  1231. <member name="M:Novacode.Table.InsertTableBeforeSelf(System.Int32,System.Int32)">
  1232. <summary>
  1233. Insert a new Table into this document before this Table.
  1234. </summary>
  1235. <param name="rowCount">The number of rows this Table should have.</param>
  1236. <param name="columnCount">The number of columns this Table should have.</param>
  1237. <returns>A new Table inserted before this Table.</returns>
  1238. <example>
  1239. <code>
  1240. // Create a new document.
  1241. using (DocX document = DocX.Create(@"Test.docx"))
  1242. {
  1243. //Insert a Table into this document.
  1244. Table t = document.InsertTable(2, 2);
  1245. t.Design = TableDesign.LightShadingAccent1;
  1246. t.Alignment = Alignment.center;
  1247. // Insert a new Table before this Table.
  1248. Table newTable = t.InsertTableBeforeSelf(2, 2);
  1249. newTable.Design = TableDesign.LightShadingAccent2;
  1250. newTable.Alignment = Alignment.center;
  1251. // Save all changes made to this document.
  1252. document.Save();
  1253. }// Release this document from memory.
  1254. </code>
  1255. </example>
  1256. </member>
  1257. <member name="M:Novacode.Table.InsertTableAfterSelf(Novacode.Table)">
  1258. <summary>
  1259. Insert a new Table after this Table, this Table can be from this document or another document.
  1260. </summary>
  1261. <param name="t">The Table t to be inserted</param>
  1262. <returns>A new Table inserted after this Table.</returns>
  1263. <example>
  1264. Insert a new Table after this Table.
  1265. <code>
  1266. // Place holder for a Table.
  1267. Table t;
  1268. // Load document a.
  1269. using (DocX documentA = DocX.Load(@"a.docx"))
  1270. {
  1271. // Get the first Table from this document.
  1272. t = documentA.Tables[0];
  1273. }
  1274. // Load document b.
  1275. using (DocX documentB = DocX.Load(@"b.docx"))
  1276. {
  1277. // Get the first Table in document b.
  1278. Table t2 = documentB.Tables[0];
  1279. // Insert the Table from document a after this Table.
  1280. Table newTable = t2.InsertTableAfterSelf(t);
  1281. // Save all changes made to document b.
  1282. documentB.Save();
  1283. }// Release this document from memory.
  1284. </code>
  1285. </example>
  1286. </member>
  1287. <member name="M:Novacode.Table.InsertTableAfterSelf(System.Int32,System.Int32)">
  1288. <summary>
  1289. Insert a new Table into this document after this Table.
  1290. </summary>
  1291. <param name="rowCount">The number of rows this Table should have.</param>
  1292. <param name="columnCount">The number of columns this Table should have.</param>
  1293. <returns>A new Table inserted before this Table.</returns>
  1294. <example>
  1295. <code>
  1296. // Create a new document.
  1297. using (DocX document = DocX.Create(@"Test.docx"))
  1298. {
  1299. //Insert a Table into this document.
  1300. Table t = document.InsertTable(2, 2);
  1301. t.Design = TableDesign.LightShadingAccent1;
  1302. t.Alignment = Alignment.center;
  1303. // Insert a new Table after this Table.
  1304. Table newTable = t.InsertTableAfterSelf(2, 2);
  1305. newTable.Design = TableDesign.LightShadingAccent2;
  1306. newTable.Alignment = Alignment.center;
  1307. // Save all changes made to this document.
  1308. document.Save();
  1309. }// Release this document from memory.
  1310. </code>
  1311. </example>
  1312. </member>
  1313. <member name="M:Novacode.Table.InsertParagraphBeforeSelf(Novacode.Paragraph)">
  1314. <summary>
  1315. Insert a Paragraph before this Table, this Paragraph may have come from the same or another document.
  1316. </summary>
  1317. <param name="p">The Paragraph to insert.</param>
  1318. <returns>The Paragraph now associated with this document.</returns>
  1319. <example>
  1320. Take a Paragraph from document a, and insert it into document b before this Table.
  1321. <code>
  1322. // Place holder for a Paragraph.
  1323. Paragraph p;
  1324. // Load document a.
  1325. using (DocX documentA = DocX.Load(@"a.docx"))
  1326. {
  1327. // Get the first paragraph from this document.
  1328. p = documentA.Paragraphs[0];
  1329. }
  1330. // Load document b.
  1331. using (DocX documentB = DocX.Load(@"b.docx"))
  1332. {
  1333. // Get the first Table in document b.
  1334. Table t = documentB.Tables[0];
  1335. // Insert the Paragraph from document a before this Table.
  1336. Paragraph newParagraph = t.InsertParagraphBeforeSelf(p);
  1337. // Save all changes made to document b.
  1338. documentB.Save();
  1339. }// Release this document from memory.
  1340. </code>
  1341. </example>
  1342. </member>
  1343. <member name="M:Novacode.Table.InsertParagraphBeforeSelf(System.String)">
  1344. <summary>
  1345. Insert a new Paragraph before this Table.
  1346. </summary>
  1347. <param name="text">The initial text for this new Paragraph.</param>
  1348. <returns>A new Paragraph inserted before this Table.</returns>
  1349. <example>
  1350. Insert a new Paragraph before the first Table in this document.
  1351. <code>
  1352. // Create a new document.
  1353. using (DocX document = DocX.Create(@"Test.docx"))
  1354. {
  1355. // Insert a Table into this document.
  1356. Table t = document.InsertTable(2, 2);
  1357. t.InsertParagraphBeforeSelf("I was inserted before the next Table.");
  1358. // Save all changes made to this new document.
  1359. document.Save();
  1360. }// Release this new document form memory.
  1361. </code>
  1362. </example>
  1363. </member>
  1364. <member name="M:Novacode.Table.InsertParagraphBeforeSelf(System.String,System.Boolean)">
  1365. <summary>
  1366. Insert a new Paragraph before this Table.
  1367. </summary>
  1368. <param name="text">The initial text for this new Paragraph.</param>
  1369. <param name="trackChanges">Should this insertion be tracked as a change?</param>
  1370. <returns>A new Paragraph inserted before this Table.</returns>
  1371. <example>
  1372. Insert a new paragraph before the first Table in this document.
  1373. <code>
  1374. // Create a new document.
  1375. using (DocX document = DocX.Create(@"Test.docx"))
  1376. {
  1377. // Insert a Table into this document.
  1378. Table t = document.InsertTable(2, 2);
  1379. t.InsertParagraphBeforeSelf("I was inserted before the next Table.", false);
  1380. // Save all changes made to this new document.
  1381. document.Save();
  1382. }// Release this new document form memory.
  1383. </code>
  1384. </example>
  1385. </member>
  1386. <member name="M:Novacode.Table.InsertParagraphBeforeSelf(System.String,System.Boolean,Novacode.Formatting)">
  1387. <summary>
  1388. Insert a new Paragraph before this Table.
  1389. </summary>
  1390. <param name="text">The initial text for this new Paragraph.</param>
  1391. <param name="trackChanges">Should this insertion be tracked as a change?</param>
  1392. <param name="formatting">The formatting to apply to this insertion.</param>
  1393. <returns>A new Paragraph inserted before this Table.</returns>
  1394. <example>
  1395. Insert a new paragraph before the first Table in this document.
  1396. <code>
  1397. // Create a new document.
  1398. using (DocX document = DocX.Create(@"Test.docx"))
  1399. {
  1400. // Insert a Table into this document.
  1401. Table t = document.InsertTable(2, 2);
  1402. Formatting boldFormatting = new Formatting();
  1403. boldFormatting.Bold = true;
  1404. t.InsertParagraphBeforeSelf("I was inserted before the next Table.", false, boldFormatting);
  1405. // Save all changes made to this new document.
  1406. document.Save();
  1407. }// Release this new document form memory.
  1408. </code>
  1409. </example>
  1410. </member>
  1411. <member name="M:Novacode.Table.InsertParagraphAfterSelf(Novacode.Paragraph)">
  1412. <summary>
  1413. Insert a Paragraph after this Table, this Paragraph may have come from the same or another document.
  1414. </summary>
  1415. <param name="p">The Paragraph to insert.</param>
  1416. <returns>The Paragraph now associated with this document.</returns>
  1417. <example>
  1418. Take a Paragraph from document a, and insert it into document b after this Table.
  1419. <code>
  1420. // Place holder for a Paragraph.
  1421. Paragraph p;
  1422. // Load document a.
  1423. using (DocX documentA = DocX.Load(@"a.docx"))
  1424. {
  1425. // Get the first paragraph from this document.
  1426. p = documentA.Paragraphs[0];
  1427. }
  1428. // Load document b.
  1429. using (DocX documentB = DocX.Load(@"b.docx"))
  1430. {
  1431. // Get the first Table in document b.
  1432. Table t = documentB.Tables[0];
  1433. // Insert the Paragraph from document a after this Table.
  1434. Paragraph newParagraph = t.InsertParagraphAfterSelf(p);
  1435. // Save all changes made to document b.
  1436. documentB.Save();
  1437. }// Release this document from memory.
  1438. </code>
  1439. </example>
  1440. </member>
  1441. <member name="M:Novacode.Table.InsertParagraphAfterSelf(System.String,System.Boolean,Novacode.Formatting)">
  1442. <summary>
  1443. Insert a new Paragraph after this Table.
  1444. </summary>
  1445. <param name="text">The initial text for this new Paragraph.</param>
  1446. <param name="trackChanges">Should this insertion be tracked as a change?</param>
  1447. <param name="formatting">The formatting to apply to this insertion.</param>
  1448. <returns>A new Paragraph inserted after this Table.</returns>
  1449. <example>
  1450. Insert a new paragraph after the first Table in this document.
  1451. <code>
  1452. // Create a new document.
  1453. using (DocX document = DocX.Create(@"Test.docx"))
  1454. {
  1455. // Insert a Table into this document.
  1456. Table t = document.InsertTable(2, 2);
  1457. Formatting boldFormatting = new Formatting();
  1458. boldFormatting.Bold = true;
  1459. t.InsertParagraphAfterSelf("I was inserted after the previous Table.", false, boldFormatting);
  1460. // Save all changes made to this new document.
  1461. document.Save();
  1462. }// Release this new document form memory.
  1463. </code>
  1464. </example>
  1465. </member>
  1466. <member name="M:Novacode.Table.InsertParagraphAfterSelf(System.String,System.Boolean)">
  1467. <summary>
  1468. Insert a new Paragraph after this Table.
  1469. </summary>
  1470. <param name="text">The initial text for this new Paragraph.</param>
  1471. <param name="trackChanges">Should this insertion be tracked as a change?</param>
  1472. <returns>A new Paragraph inserted after this Table.</returns>
  1473. <example>
  1474. Insert a new paragraph after the first Table in this document.
  1475. <code>
  1476. // Create a new document.
  1477. using (DocX document = DocX.Create(@"Test.docx"))
  1478. {
  1479. // Insert a Table into this document.
  1480. Table t = document.InsertTable(2, 2);
  1481. t.InsertParagraphAfterSelf("I was inserted after the previous Table.", false);
  1482. // Save all changes made to this new document.
  1483. document.Save();
  1484. }// Release this new document form memory.
  1485. </code>
  1486. </example>
  1487. </member>
  1488. <member name="M:Novacode.Table.InsertParagraphAfterSelf(System.String)">
  1489. <summary>
  1490. Insert a new Paragraph after this Table.
  1491. </summary>
  1492. <param name="text">The initial text for this new Paragraph.</param>
  1493. <returns>A new Paragraph inserted after this Table.</returns>
  1494. <example>
  1495. Insert a new Paragraph after the first Table in this document.
  1496. <code>
  1497. // Create a new document.
  1498. using (DocX document = DocX.Create(@"Test.docx"))
  1499. {
  1500. // Insert a Table into this document.
  1501. Table t = document.InsertTable(2, 2);
  1502. t.InsertParagraphAfterSelf("I was inserted after the previous Table.");
  1503. // Save all changes made to this new document.
  1504. document.Save();
  1505. }// Release this new document form memory.
  1506. </code>
  1507. </example>
  1508. </member>
  1509. <member name="M:Novacode.Table.SetBorder(Novacode.TableBorderType,Novacode.Border)">
  1510. <summary>
  1511. Set a table border
  1512. Added by lckuiper @ 20101117
  1513. </summary>
  1514. <example>
  1515. <code>
  1516. // Create a new document.
  1517. using (DocX document = DocX.Create("Test.docx"))
  1518. {
  1519. // Insert a table into this document.
  1520. Table t = document.InsertTable(3, 3);
  1521. // Create a large blue border.
  1522. Border b = new Border(BorderStyle.Tcbs_single, BorderSize.seven, 0, Color.Blue);
  1523. // Set the tables Top, Bottom, Left and Right Borders to b.
  1524. t.SetBorder(TableBorderType.Top, b);
  1525. t.SetBorder(TableBorderType.Bottom, b);
  1526. t.SetBorder(TableBorderType.Left, b);
  1527. t.SetBorder(TableBorderType.Right, b);
  1528. // Save the document.
  1529. document.Save();
  1530. }
  1531. </code>
  1532. </example>
  1533. <param name="borderType">The table border to set</param>
  1534. <param name="border">Border object to set the table border</param>
  1535. </member>
  1536. <member name="M:Novacode.Table.GetBorder(Novacode.TableBorderType)">
  1537. <summary>
  1538. Get a table border
  1539. Added by lckuiper @ 20101117
  1540. </summary>
  1541. <param name="borderType">The table border to get</param>
  1542. </member>
  1543. <member name="T:Novacode.Row">
  1544. <summary>
  1545. Represents a single row in a Table.
  1546. </summary>
  1547. </member>
  1548. <member name="P:Novacode.Row.ColumnCount">
  1549. <summary>
  1550. Calculates columns count in the row, taking spanned cells into account
  1551. </summary>
  1552. </member>
  1553. <member name="P:Novacode.Row.gridAfter">
  1554. <summary>
  1555. Returns the GridAfter of a row ie. The amount of cells that are deleted
  1556. </summary>
  1557. </member>
  1558. <member name="P:Novacode.Row.Cells">
  1559. <summary>
  1560. A list of Cells in this Row.
  1561. </summary>
  1562. </member>
  1563. <member name="F:Novacode.Row._hRule_Exact">
  1564. <summary>
  1565. The property name to set when specifiying an exact height
  1566. </summary>
  1567. <created>Nick Kusters</created>
  1568. </member>
  1569. <member name="F:Novacode.Row._hRule_AtLeast">
  1570. <summary>
  1571. The property name to set when specifying a minimum height
  1572. </summary>
  1573. <created>Nick Kusters</created>
  1574. </member>
  1575. <member name="P:Novacode.Row.Height">
  1576. <summary>
  1577. Height in pixels. // Added by Joel, refactored by Cathal.
  1578. </summary>
  1579. </member>
  1580. <member name="M:Novacode.Row.SetHeight(System.Double,System.Boolean)">
  1581. <summary>
  1582. Helper method to set either the exact height or the min-height
  1583. </summary>
  1584. <param name="height">The height value to set (in pixels)</param>
  1585. <param name="exact">
  1586. If true, the height will be forced.
  1587. If false, it will be treated as a minimum height, auto growing past it if need be.
  1588. </param>
  1589. <created>Nick Kusters</created>
  1590. </member>
  1591. <member name="P:Novacode.Row.MinHeight">
  1592. <summary>
  1593. Min-Height in pixels. // Added by Nick Kusters.
  1594. </summary>
  1595. <remarks>
  1596. Value will be treated as a minimum height, auto growing past it if need be.
  1597. </remarks>
  1598. <created>Nick Kusters</created>
  1599. </member>
  1600. <member name="P:Novacode.Row.TableHeader">
  1601. <summary>
  1602. Set to true to make this row the table header row that will be repeated on each page
  1603. </summary>
  1604. </member>
  1605. <member name="P:Novacode.Row.BreakAcrossPages">
  1606. <summary>
  1607. Allow row to break across pages.
  1608. The default value is true: Word will break the contents of the row across pages.
  1609. If set to false, the contents of the row will not be split across pages, the entire row will be moved to the next page instead.
  1610. </summary>
  1611. </member>
  1612. <member name="M:Novacode.Row.MergeCells(System.Int32,System.Int32)">
  1613. <summary>
  1614. Merge cells starting with startIndex and ending with endIndex.
  1615. </summary>
  1616. </member>
  1617. <member name="P:Novacode.Cell.GridSpan">
  1618. <summary>
  1619. Returns the GridSpan of a specific Cell ie. How many cells are merged
  1620. </summary>
  1621. </member>
  1622. <member name="P:Novacode.Cell.VerticalAlignment">
  1623. <summary>
  1624. Gets or Sets this Cells vertical alignment.
  1625. </summary>
  1626. <!--Patch 7398 added by lckuiper on Nov 16th 2010 @ 2:23 PM-->
  1627. <example>
  1628. Creates a table with 3 cells and sets the vertical alignment of each to 1 of the 3 available options.
  1629. <code>
  1630. // Create a new document.
  1631. using(DocX document = DocX.Create("Test.docx"))
  1632. {
  1633. // Insert a Table into this document.
  1634. Table t = document.InsertTable(3, 1);
  1635. // Set the design of the Table such that we can easily identify cell boundaries.
  1636. t.Design = TableDesign.TableGrid;
  1637. // Set the height of the row bigger than default.
  1638. // We need to be able to see the difference in vertical cell alignment options.
  1639. t.Rows[0].Height = 100;
  1640. // Set the vertical alignment of cell0 to top.
  1641. Cell c0 = t.Rows[0].Cells[0];
  1642. c0.InsertParagraph("VerticalAlignment.Top");
  1643. c0.VerticalAlignment = VerticalAlignment.Top;
  1644. // Set the vertical alignment of cell1 to center.
  1645. Cell c1 = t.Rows[0].Cells[1];
  1646. c1.InsertParagraph("VerticalAlignment.Center");
  1647. c1.VerticalAlignment = VerticalAlignment.Center;
  1648. // Set the vertical alignment of cell2 to bottom.
  1649. Cell c2 = t.Rows[0].Cells[2];
  1650. c2.InsertParagraph("VerticalAlignment.Bottom");
  1651. c2.VerticalAlignment = VerticalAlignment.Bottom;
  1652. // Save the document.
  1653. document.Save();
  1654. }
  1655. </code>
  1656. </example>
  1657. </member>
  1658. <member name="P:Novacode.Cell.Width">
  1659. <summary>
  1660. Width in pixels. // Added by Joel, refactored by Cathal
  1661. </summary>
  1662. </member>
  1663. <member name="P:Novacode.Cell.MarginLeft">
  1664. <summary>
  1665. LeftMargin in pixels. // Added by lckuiper
  1666. </summary>
  1667. <example>
  1668. <code>
  1669. // Create a new document.
  1670. using (DocX document = DocX.Create("Test.docx"))
  1671. {
  1672. // Insert table into this document.
  1673. Table t = document.InsertTable(3, 3);
  1674. t.Design = TableDesign.TableGrid;
  1675. // Get the center cell.
  1676. Cell center = t.Rows[1].Cells[1];
  1677. // Insert some text so that we can see the effect of the Margins.
  1678. center.Paragraphs[0].Append("Center Cell");
  1679. // Set the center cells Left, Margin to 10.
  1680. center.MarginLeft = 25;
  1681. // Save the document.
  1682. document.Save();
  1683. }
  1684. </code>
  1685. </example>
  1686. </member>
  1687. <member name="P:Novacode.Cell.MarginRight">
  1688. <summary>
  1689. RightMargin in pixels. // Added by lckuiper
  1690. </summary>
  1691. <example>
  1692. <code>
  1693. // Create a new document.
  1694. using (DocX document = DocX.Create("Test.docx"))
  1695. {
  1696. // Insert table into this document.
  1697. Table t = document.InsertTable(3, 3);
  1698. t.Design = TableDesign.TableGrid;
  1699. // Get the center cell.
  1700. Cell center = t.Rows[1].Cells[1];
  1701. // Insert some text so that we can see the effect of the Margins.
  1702. center.Paragraphs[0].Append("Center Cell");
  1703. // Set the center cells Right, Margin to 10.
  1704. center.MarginRight = 25;
  1705. // Save the document.
  1706. document.Save();
  1707. }
  1708. </code>
  1709. </example>
  1710. </member>
  1711. <member name="P:Novacode.Cell.MarginTop">
  1712. <summary>
  1713. TopMargin in pixels. // Added by lckuiper
  1714. </summary>
  1715. <example>
  1716. <code>
  1717. // Create a new document.
  1718. using (DocX document = DocX.Create("Test.docx"))
  1719. {
  1720. // Insert table into this document.
  1721. Table t = document.InsertTable(3, 3);
  1722. t.Design = TableDesign.TableGrid;
  1723. // Get the center cell.
  1724. Cell center = t.Rows[1].Cells[1];
  1725. // Insert some text so that we can see the effect of the Margins.
  1726. center.Paragraphs[0].Append("Center Cell");
  1727. // Set the center cells Top, Margin to 10.
  1728. center.MarginTop = 25;
  1729. // Save the document.
  1730. document.Save();
  1731. }
  1732. </code>
  1733. </example>
  1734. </member>
  1735. <member name="P:Novacode.Cell.MarginBottom">
  1736. <summary>
  1737. BottomMargin in pixels. // Added by lckuiper
  1738. </summary>
  1739. <example>
  1740. <code>
  1741. // Create a new document.
  1742. using (DocX document = DocX.Create("Test.docx"))
  1743. {
  1744. // Insert table into this document.
  1745. Table t = document.InsertTable(3, 3);
  1746. t.Design = TableDesign.TableGrid;
  1747. // Get the center cell.
  1748. Cell center = t.Rows[1].Cells[1];
  1749. // Insert some text so that we can see the effect of the Margins.
  1750. center.Paragraphs[0].Append("Center Cell");
  1751. // Set the center cells Top, Margin to 10.
  1752. center.MarginBottom = 25;
  1753. // Save the document.
  1754. document.Save();
  1755. }
  1756. </code>
  1757. </example>
  1758. </member>
  1759. <member name="M:Novacode.Cell.SetBorder(Novacode.TableCellBorderType,Novacode.Border)">
  1760. <summary>
  1761. Set the table cell border
  1762. Added by lckuiper @ 20101117
  1763. </summary>
  1764. <example>
  1765. <code>
  1766. // Create a new document.
  1767. using (DocX document = DocX.Create("Test.docx"))
  1768. {
  1769. // Insert a table into this document.
  1770. Table t = document.InsertTable(3, 3);
  1771. // Get the center cell.
  1772. Cell center = t.Rows[1].Cells[1];
  1773. // Create a large blue border.
  1774. Border b = new Border(BorderStyle.Tcbs_single, BorderSize.seven, 0, Color.Blue);
  1775. // Set the center cells Top, Bottom, Left and Right Borders to b.
  1776. center.SetBorder(TableCellBorderType.Top, b);
  1777. center.SetBorder(TableCellBorderType.Bottom, b);
  1778. center.SetBorder(TableCellBorderType.Left, b);
  1779. center.SetBorder(TableCellBorderType.Right, b);
  1780. // Save the document.
  1781. document.Save();
  1782. }
  1783. </code>
  1784. </example>
  1785. <param name="borderType">Table Cell border to set</param>
  1786. <param name="border">Border object to set the table cell border</param>
  1787. </member>
  1788. <member name="M:Novacode.Cell.GetBorder(Novacode.TableCellBorderType)">
  1789. <summary>
  1790. Get a table cell border
  1791. Added by lckuiper @ 20101117
  1792. </summary>
  1793. <param name="borderType">The table cell border to get</param>
  1794. </member>
  1795. <member name="P:Novacode.Cell.FillColor">
  1796. <summary>
  1797. Gets or Sets the fill color of this Cell.
  1798. </summary>
  1799. <example>
  1800. <code>
  1801. // Create a new document.
  1802. using (DocX document = DocX.Create("Test.docx"))
  1803. {
  1804. // Insert a table into this document.
  1805. Table t = document.InsertTable(3, 3);
  1806. // Fill the first cell as Blue.
  1807. t.Rows[0].Cells[0].FillColor = Color.Blue;
  1808. // Fill the middle cell as Red.
  1809. t.Rows[1].Cells[1].FillColor = Color.Red;
  1810. // Fill the last cell as Green.
  1811. t.Rows[2].Cells[2].FillColor = Color.Green;
  1812. // Save the document.
  1813. document.Save();
  1814. }
  1815. </code>
  1816. </example>
  1817. </member>
  1818. <member name="T:Novacode.BorderStyle">
  1819. <summary>
  1820. Table Cell Border styles
  1821. Added by lckuiper @ 20101117
  1822. source: http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.tablecellborders.aspx
  1823. </summary>
  1824. </member>
  1825. <member name="T:Novacode.TableCellBorderType">
  1826. <summary>
  1827. Table Cell Border Types
  1828. Added by lckuiper @ 20101117
  1829. source: http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.tablecellborders.aspx
  1830. </summary>
  1831. </member>
  1832. <member name="T:Novacode.TableBorderType">
  1833. <summary>
  1834. Table Border Types
  1835. Added by lckuiper @ 20101117
  1836. source: http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.tableborders.aspx
  1837. </summary>
  1838. </member>
  1839. <member name="T:Novacode.CapsStyle">
  1840. <summary>
  1841. Change the caps style of text, for use with Append and AppendLine.
  1842. </summary>
  1843. </member>
  1844. <member name="F:Novacode.CapsStyle.none">
  1845. <summary>
  1846. No caps, make all characters are lowercase.
  1847. </summary>
  1848. </member>
  1849. <member name="F:Novacode.CapsStyle.caps">
  1850. <summary>
  1851. All caps, make every character uppercase.
  1852. </summary>
  1853. </member>
  1854. <member name="F:Novacode.CapsStyle.smallCaps">
  1855. <summary>
  1856. Small caps, make all characters capital but with a small font size.
  1857. </summary>
  1858. </member>
  1859. <member name="T:Novacode.TableDesign">
  1860. <summary>
  1861. Designs\Styles that can be applied to a table.
  1862. </summary>
  1863. </member>
  1864. <member name="T:Novacode.AutoFit">
  1865. <summary>
  1866. How a Table should auto resize.
  1867. </summary>
  1868. </member>
  1869. <member name="F:Novacode.AutoFit.Contents">
  1870. <summary>
  1871. Autofit to Table contents.
  1872. </summary>
  1873. </member>
  1874. <member name="F:Novacode.AutoFit.Window">
  1875. <summary>
  1876. Autofit to Window.
  1877. </summary>
  1878. </member>
  1879. <member name="F:Novacode.AutoFit.ColumnWidth">
  1880. <summary>
  1881. Autofit to Column width.
  1882. </summary>
  1883. </member>
  1884. <member name="F:Novacode.AutoFit.Fixed">
  1885. <summary>
  1886. Autofit to Fixed column width
  1887. </summary>
  1888. </member>
  1889. <member name="T:Novacode.Alignment">
  1890. <summary>
  1891. Text alignment of a Paragraph.
  1892. </summary>
  1893. </member>
  1894. <member name="F:Novacode.Alignment.left">
  1895. <summary>
  1896. Align Paragraph to the left.
  1897. </summary>
  1898. </member>
  1899. <member name="F:Novacode.Alignment.center">
  1900. <summary>
  1901. Align Paragraph as centered.
  1902. </summary>
  1903. </member>
  1904. <member name="F:Novacode.Alignment.right">
  1905. <summary>
  1906. Align Paragraph to the right.
  1907. </summary>
  1908. </member>
  1909. <member name="F:Novacode.Alignment.both">
  1910. <summary>
  1911. (Justified) Align Paragraph to both the left and right margins, adding extra space between content as necessary.
  1912. </summary>
  1913. </member>
  1914. <member name="T:Novacode.EditType">
  1915. <summary>
  1916. Paragraph edit types
  1917. </summary>
  1918. </member>
  1919. <member name="F:Novacode.EditType.ins">
  1920. <summary>
  1921. A ins is a tracked insertion
  1922. </summary>
  1923. </member>
  1924. <member name="F:Novacode.EditType.del">
  1925. <summary>
  1926. A del is tracked deletion
  1927. </summary>
  1928. </member>
  1929. <member name="T:Novacode.CustomPropertyType">
  1930. <summary>
  1931. Custom property types.
  1932. </summary>
  1933. </member>
  1934. <member name="F:Novacode.CustomPropertyType.Text">
  1935. <summary>
  1936. System.String
  1937. </summary>
  1938. </member>
  1939. <member name="F:Novacode.CustomPropertyType.Date">
  1940. <summary>
  1941. System.DateTime
  1942. </summary>
  1943. </member>
  1944. <member name="F:Novacode.CustomPropertyType.NumberInteger">
  1945. <summary>
  1946. System.Int32
  1947. </summary>
  1948. </member>
  1949. <member name="F:Novacode.CustomPropertyType.NumberDecimal">
  1950. <summary>
  1951. System.Double
  1952. </summary>
  1953. </member>
  1954. <member name="F:Novacode.CustomPropertyType.YesOrNo">
  1955. <summary>
  1956. System.Boolean
  1957. </summary>
  1958. </member>
  1959. <member name="T:Novacode.RunTextType">
  1960. <summary>
  1961. Text types in a Run
  1962. </summary>
  1963. </member>
  1964. <member name="F:Novacode.RunTextType.Text">
  1965. <summary>
  1966. System.String
  1967. </summary>
  1968. </member>
  1969. <member name="F:Novacode.RunTextType.DelText">
  1970. <summary>
  1971. System.String
  1972. </summary>
  1973. </member>
  1974. <member name="T:Novacode.TableCellMarginType">
  1975. <summary>
  1976. Cell margin for all sides of the table cell.
  1977. </summary>
  1978. </member>
  1979. <member name="F:Novacode.TableCellMarginType.left">
  1980. <summary>
  1981. The left cell margin.
  1982. </summary>
  1983. </member>
  1984. <member name="F:Novacode.TableCellMarginType.right">
  1985. <summary>
  1986. The right cell margin.
  1987. </summary>
  1988. </member>
  1989. <member name="F:Novacode.TableCellMarginType.bottom">
  1990. <summary>
  1991. The bottom cell margin.
  1992. </summary>
  1993. </member>
  1994. <member name="F:Novacode.TableCellMarginType.top">
  1995. <summary>
  1996. The top cell margin.
  1997. </summary>
  1998. </member>
  1999. <member name="T:Novacode.TableOfContentsSwitches">
  2000. <summary>
  2001. Represents the switches set on a TOC.
  2002. </summary>
  2003. </member>
  2004. <member name="T:Novacode.Formatting">
  2005. <summary>
  2006. A text formatting.
  2007. </summary>
  2008. </member>
  2009. <member name="M:Novacode.Formatting.#ctor">
  2010. <summary>
  2011. A text formatting.
  2012. </summary>
  2013. </member>
  2014. <member name="P:Novacode.Formatting.Language">
  2015. <summary>
  2016. Text language
  2017. </summary>
  2018. </member>
  2019. <member name="M:Novacode.Formatting.Clone">
  2020. <summary>
  2021. Returns a new identical instance of Formatting.
  2022. </summary>
  2023. <returns></returns>
  2024. </member>
  2025. <member name="P:Novacode.Formatting.Bold">
  2026. <summary>
  2027. This formatting will apply Bold.
  2028. </summary>
  2029. </member>
  2030. <member name="P:Novacode.Formatting.Italic">
  2031. <summary>
  2032. This formatting will apply Italic.
  2033. </summary>
  2034. </member>
  2035. <member name="P:Novacode.Formatting.StrikeThrough">
  2036. <summary>
  2037. This formatting will apply StrickThrough.
  2038. </summary>
  2039. </member>
  2040. <member name="P:Novacode.Formatting.Script">
  2041. <summary>
  2042. The script that this formatting should be, normal, superscript or subscript.
  2043. </summary>
  2044. </member>
  2045. <member name="P:Novacode.Formatting.Size">
  2046. <summary>
  2047. The Size of this text, must be between 0 and 1638.
  2048. </summary>
  2049. </member>
  2050. <member name="P:Novacode.Formatting.PercentageScale">
  2051. <summary>
  2052. Percentage scale must be one of the following values 200, 150, 100, 90, 80, 66, 50 or 33.
  2053. </summary>
  2054. </member>
  2055. <member name="P:Novacode.Formatting.Kerning">
  2056. <summary>
  2057. The Kerning to apply to this text must be one of the following values 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72.
  2058. </summary>
  2059. </member>
  2060. <member name="P:Novacode.Formatting.Position">
  2061. <summary>
  2062. Text position must be in the range (-1585 - 1585).
  2063. </summary>
  2064. </member>
  2065. <member name="P:Novacode.Formatting.Spacing">
  2066. <summary>
  2067. Text spacing must be in the range (-1585 - 1585).
  2068. </summary>
  2069. </member>
  2070. <member name="P:Novacode.Formatting.FontColor">
  2071. <summary>
  2072. The colour of the text.
  2073. </summary>
  2074. </member>
  2075. <member name="P:Novacode.Formatting.Highlight">
  2076. <summary>
  2077. Highlight colour.
  2078. </summary>
  2079. </member>
  2080. <member name="P:Novacode.Formatting.UnderlineStyle">
  2081. <summary>
  2082. The Underline style that this formatting applies.
  2083. </summary>
  2084. </member>
  2085. <member name="P:Novacode.Formatting.UnderlineColor">
  2086. <summary>
  2087. The underline colour.
  2088. </summary>
  2089. </member>
  2090. <member name="P:Novacode.Formatting.Misc">
  2091. <summary>
  2092. Misc settings.
  2093. </summary>
  2094. </member>
  2095. <member name="P:Novacode.Formatting.Hidden">
  2096. <summary>
  2097. Is this text hidden or visible.
  2098. </summary>
  2099. </member>
  2100. <member name="P:Novacode.Formatting.CapsStyle">
  2101. <summary>
  2102. Capitalization style.
  2103. </summary>
  2104. </member>
  2105. <member name="P:Novacode.Formatting.FontFamily">
  2106. <summary>
  2107. The font family of this formatting.
  2108. </summary>
  2109. <!--
  2110. Bug found and fixed by krugs525 on August 12 2009.
  2111. Use TFS compare to see exact code change.
  2112. -->
  2113. </member>
  2114. <member name="T:Novacode.Image">
  2115. <summary>
  2116. Represents an Image embedded in a document.
  2117. </summary>
  2118. </member>
  2119. <member name="F:Novacode.Image.id">
  2120. <summary>
  2121. A unique id which identifies this Image.
  2122. </summary>
  2123. </member>
  2124. <member name="P:Novacode.Image.Id">
  2125. <summary>
  2126. Returns the id of this Image.
  2127. </summary>
  2128. </member>
  2129. <member name="M:Novacode.Image.CreatePicture">
  2130. <summary>
  2131. Add an image to a document, create a custom view of that image (picture) and then insert it into a Paragraph using append.
  2132. </summary>
  2133. <returns></returns>
  2134. <example>
  2135. Add an image to a document, create a custom view of that image (picture) and then insert it into a Paragraph using append.
  2136. <code>
  2137. using (DocX document = DocX.Create("Test.docx"))
  2138. {
  2139. // Add an image to the document.
  2140. Image i = document.AddImage(@"Image.jpg");
  2141. // Create a picture i.e. (A custom view of an image)
  2142. Picture p = i.CreatePicture();
  2143. p.FlipHorizontal = true;
  2144. p.Rotation = 10;
  2145. // Create a new Paragraph.
  2146. Paragraph par = document.InsertParagraph();
  2147. // Append content to the Paragraph.
  2148. par.Append("Here is a cool picture")
  2149. .AppendPicture(p)
  2150. .Append(" don't you think so?");
  2151. // Save all changes made to this document.
  2152. document.Save();
  2153. }
  2154. </code>
  2155. </example>
  2156. </member>
  2157. <member name="P:Novacode.Image.FileName">
  2158. <summary>
  2159. Returns the name of the image file.
  2160. </summary>
  2161. </member>
  2162. <member name="T:Novacode.Picture">
  2163. <summary>
  2164. Represents a Picture in this document, a Picture is a customized view of an Image.
  2165. </summary>
  2166. </member>
  2167. <member name="M:Novacode.Picture.Remove">
  2168. <summary>
  2169. Remove this Picture from this document.
  2170. </summary>
  2171. </member>
  2172. <member name="M:Novacode.Picture.#ctor(Novacode.DocX,System.Xml.Linq.XElement,Novacode.Image)">
  2173. <summary>
  2174. Wraps an XElement as an Image
  2175. </summary>
  2176. <param name="document"></param>
  2177. <param name="i">The XElement i to wrap</param>
  2178. <param name="img"></param>
  2179. </member>
  2180. <member name="M:Novacode.Picture.SetPictureShape(Novacode.BasicShapes)">
  2181. <summary>
  2182. Set the shape of this Picture to one in the BasicShapes enumeration.
  2183. </summary>
  2184. <param name="shape">A shape from the BasicShapes enumeration.</param>
  2185. </member>
  2186. <member name="M:Novacode.Picture.SetPictureShape(Novacode.RectangleShapes)">
  2187. <summary>
  2188. Set the shape of this Picture to one in the RectangleShapes enumeration.
  2189. </summary>
  2190. <param name="shape">A shape from the RectangleShapes enumeration.</param>
  2191. </member>
  2192. <member name="M:Novacode.Picture.SetPictureShape(Novacode.BlockArrowShapes)">
  2193. <summary>
  2194. Set the shape of this Picture to one in the BlockArrowShapes enumeration.
  2195. </summary>
  2196. <param name="shape">A shape from the BlockArrowShapes enumeration.</param>
  2197. </member>
  2198. <member name="M:Novacode.Picture.SetPictureShape(Novacode.EquationShapes)">
  2199. <summary>
  2200. Set the shape of this Picture to one in the EquationShapes enumeration.
  2201. </summary>
  2202. <param name="shape">A shape from the EquationShapes enumeration.</param>
  2203. </member>
  2204. <member name="M:Novacode.Picture.SetPictureShape(Novacode.FlowchartShapes)">
  2205. <summary>
  2206. Set the shape of this Picture to one in the FlowchartShapes enumeration.
  2207. </summary>
  2208. <param name="shape">A shape from the FlowchartShapes enumeration.</param>
  2209. </member>
  2210. <member name="M:Novacode.Picture.SetPictureShape(Novacode.StarAndBannerShapes)">
  2211. <summary>
  2212. Set the shape of this Picture to one in the StarAndBannerShapes enumeration.
  2213. </summary>
  2214. <param name="shape">A shape from the StarAndBannerShapes enumeration.</param>
  2215. </member>
  2216. <member name="M:Novacode.Picture.SetPictureShape(Novacode.CalloutShapes)">
  2217. <summary>
  2218. Set the shape of this Picture to one in the CalloutShapes enumeration.
  2219. </summary>
  2220. <param name="shape">A shape from the CalloutShapes enumeration.</param>
  2221. </member>
  2222. <member name="P:Novacode.Picture.Id">
  2223. <summary>
  2224. A unique id that identifies an Image embedded in this document.
  2225. </summary>
  2226. </member>
  2227. <member name="P:Novacode.Picture.FlipHorizontal">
  2228. <summary>
  2229. Flip this Picture Horizontally.
  2230. </summary>
  2231. </member>
  2232. <member name="P:Novacode.Picture.FlipVertical">
  2233. <summary>
  2234. Flip this Picture Vertically.
  2235. </summary>
  2236. </member>
  2237. <member name="P:Novacode.Picture.Rotation">
  2238. <summary>
  2239. The rotation in degrees of this image, actual value = value % 360
  2240. </summary>
  2241. </member>
  2242. <member name="P:Novacode.Picture.Name">
  2243. <summary>
  2244. Gets or sets the name of this Image.
  2245. </summary>
  2246. </member>
  2247. <member name="P:Novacode.Picture.Description">
  2248. <summary>
  2249. Gets or sets the description for this Image.
  2250. </summary>
  2251. </member>
  2252. <member name="P:Novacode.Picture.FileName">
  2253. <summary>
  2254. Returns the name of the image file for the picture.
  2255. </summary>
  2256. </member>
  2257. <member name="P:Novacode.Picture.Width">
  2258. <summary>
  2259. Get or sets the Width of this Image.
  2260. </summary>
  2261. </member>
  2262. <member name="P:Novacode.Picture.Height">
  2263. <summary>
  2264. Get or sets the height of this Image.
  2265. </summary>
  2266. </member>
  2267. <member name="T:Novacode.Paragraph">
  2268. <summary>
  2269. Represents a document paragraph.
  2270. </summary>
  2271. </member>
  2272. <member name="P:Novacode.Paragraph.ParagraphNumberProperties">
  2273. <summary>
  2274. Fetch the paragraph number properties for a list element.
  2275. </summary>
  2276. </member>
  2277. <member name="P:Novacode.Paragraph.IsListItem">
  2278. <summary>
  2279. Determine if this paragraph is a list element.
  2280. </summary>
  2281. </member>
  2282. <member name="P:Novacode.Paragraph.IndentLevel">
  2283. <summary>
  2284. If this element is a list item, get the indentation level of the list item.
  2285. </summary>
  2286. </member>
  2287. <member name="F:Novacode.Paragraph.ListItemType">
  2288. <summary>
  2289. Determine if the list element is a numbered list of bulleted list element
  2290. </summary>
  2291. </member>
  2292. <member name="P:Novacode.Paragraph.Pictures">
  2293. <summary>
  2294. Returns a list of all Pictures in a Paragraph.
  2295. </summary>
  2296. <example>
  2297. Returns a list of all Pictures in a Paragraph.
  2298. <code>
  2299. <![CDATA[
  2300. // Create a document.
  2301. using (DocX document = DocX.Load(@"Test.docx"))
  2302. {
  2303. // Get the first Paragraph in a document.
  2304. Paragraph p = document.Paragraphs[0];
  2305. // Get all of the Pictures in this Paragraph.
  2306. List<Picture> pictures = p.Pictures;
  2307. // Save this document.
  2308. document.Save();
  2309. }
  2310. ]]>
  2311. </code>
  2312. </example>
  2313. </member>
  2314. <member name="P:Novacode.Paragraph.Hyperlinks">
  2315. <summary>
  2316. Returns a list of Hyperlinks in this Paragraph.
  2317. </summary>
  2318. <example>
  2319. <code>
  2320. // Create a document.
  2321. using (DocX document = DocX.Load(@"Test.docx"))
  2322. {
  2323. // Get the first Paragraph in this document.
  2324. Paragraph p = document.Paragraphs[0];
  2325. // Get all of the hyperlinks in this Paragraph.
  2326. <![CDATA[ List<Hyperlink> ]]> hyperlinks = paragraph.Hyperlinks;
  2327. // Change the first hyperlinks text and Uri
  2328. Hyperlink h0 = hyperlinks[0];
  2329. h0.Text = "DocX";
  2330. h0.Uri = new Uri("http://docx.codeplex.com");
  2331. // Save this document.
  2332. document.Save();
  2333. }
  2334. </code>
  2335. </example>
  2336. </member>
  2337. <member name="P:Novacode.Paragraph.StyleName">
  2338. <summary>
  2339. The style name of the paragraph.
  2340. </summary>
  2341. </member>
  2342. <member name="P:Novacode.Paragraph.DocumentProperties">
  2343. <summary>
  2344. Returns a list of field type DocProperty in this document.
  2345. </summary>
  2346. </member>
  2347. <member name="M:Novacode.Paragraph.InsertTableBeforeSelf(Novacode.Table)">
  2348. <summary>
  2349. Insert a new Table before this Paragraph, this Table can be from this document or another document.
  2350. </summary>
  2351. <param name="t">The Table t to be inserted.</param>
  2352. <returns>A new Table inserted before this Paragraph.</returns>
  2353. <example>
  2354. Insert a new Table before this Paragraph.
  2355. <code>
  2356. // Place holder for a Table.
  2357. Table t;
  2358. // Load document a.
  2359. using (DocX documentA = DocX.Load(@"a.docx"))
  2360. {
  2361. // Get the first Table from this document.
  2362. t = documentA.Tables[0];
  2363. }
  2364. // Load document b.
  2365. using (DocX documentB = DocX.Load(@"b.docx"))
  2366. {
  2367. // Get the first Paragraph in document b.
  2368. Paragraph p2 = documentB.Paragraphs[0];
  2369. // Insert the Table from document a before this Paragraph.
  2370. Table newTable = p2.InsertTableBeforeSelf(t);
  2371. // Save all changes made to document b.
  2372. documentB.Save();
  2373. }// Release this document from memory.
  2374. </code>
  2375. </example>
  2376. </member>
  2377. <member name="P:Novacode.Paragraph.Direction">
  2378. <summary>
  2379. Gets or Sets the Direction of content in this Paragraph.
  2380. <example>
  2381. Create a Paragraph with content that flows right to left. Default is left to right.
  2382. <code>
  2383. // Create a new document.
  2384. using (DocX document = DocX.Create("Test.docx"))
  2385. {
  2386. // Create a new Paragraph with the text "Hello World".
  2387. Paragraph p = document.InsertParagraph("Hello World.");
  2388. // Make this Paragraph flow right to left. Default is left to right.
  2389. p.Direction = Direction.RightToLeft;
  2390. // Save all changes made to this document.
  2391. document.Save();
  2392. }
  2393. </code>
  2394. </example>
  2395. </summary>
  2396. </member>
  2397. <member name="M:Novacode.Paragraph.KeepWithNext(System.Boolean)">
  2398. <summary>
  2399. This paragraph will be kept on the same page as the next paragraph
  2400. </summary>
  2401. <example>
  2402. Create a Paragraph that will stay on the same page as the paragraph that comes next
  2403. <code>
  2404. // Create a new document.
  2405. using (DocX document = DocX.Create("Test.docx"))
  2406. {
  2407. // Create a new Paragraph with the text "Hello World".
  2408. Paragraph p = document.InsertParagraph("Hello World.");
  2409. p.KeepWithNext();
  2410. document.InsertParagraph("Previous paragraph will appear on the same page as this paragraph");
  2411. // Save all changes made to this document.
  2412. document.Save();
  2413. }
  2414. </code>
  2415. </example>
  2416. <param name="keepWithNext"></param>
  2417. <returns></returns>
  2418. </member>
  2419. <member name="M:Novacode.Paragraph.KeepLinesTogether(System.Boolean)">
  2420. <summary>
  2421. Keep all lines in this paragraph together on a page
  2422. </summary>
  2423. <example>
  2424. Create a Paragraph whose lines will stay together on a single page
  2425. <code>
  2426. // Create a new document.
  2427. using (DocX document = DocX.Create("Test.docx"))
  2428. {
  2429. // Create a new Paragraph with the text "Hello World".
  2430. Paragraph p = document.InsertParagraph("All lines of this paragraph will appear on the same page...\nLine 2\nLine 3\nLine 4\nLine 5\nLine 6...");
  2431. p.KeepLinesTogether();
  2432. // Save all changes made to this document.
  2433. document.Save();
  2434. }
  2435. </code>
  2436. </example>
  2437. <param name="keepTogether"></param>
  2438. <returns></returns>
  2439. </member>
  2440. <member name="M:Novacode.Paragraph.GetOrCreate_pPr">
  2441. <summary>
  2442. If the pPr element doesent exist it is created, either way it is returned by this function.
  2443. </summary>
  2444. <returns>The pPr element for this Paragraph.</returns>
  2445. </member>
  2446. <member name="M:Novacode.Paragraph.GetOrCreate_pPr_ind">
  2447. <summary>
  2448. If the ind element doesent exist it is created, either way it is returned by this function.
  2449. </summary>
  2450. <returns>The ind element for this Paragraphs pPr.</returns>
  2451. </member>
  2452. <member name="P:Novacode.Paragraph.IndentationFirstLine">
  2453. <summary>
  2454. Get or set the indentation of the first line of this Paragraph.
  2455. </summary>
  2456. <example>
  2457. Indent only the first line of a Paragraph.
  2458. <code>
  2459. // Create a new document.
  2460. using (DocX document = DocX.Create("Test.docx"))
  2461. {
  2462. // Create a new Paragraph.
  2463. Paragraph p = document.InsertParagraph("Line 1\nLine 2\nLine 3");
  2464. // Indent only the first line of the Paragraph.
  2465. p.IndentationFirstLine = 2.0f;
  2466. // Save all changes made to this document.
  2467. document.Save();
  2468. }
  2469. </code>
  2470. </example>
  2471. </member>
  2472. <member name="P:Novacode.Paragraph.IndentationHanging">
  2473. <summary>
  2474. Get or set the indentation of all but the first line of this Paragraph.
  2475. </summary>
  2476. <example>
  2477. Indent all but the first line of a Paragraph.
  2478. <code>
  2479. // Create a new document.
  2480. using (DocX document = DocX.Create("Test.docx"))
  2481. {
  2482. // Create a new Paragraph.
  2483. Paragraph p = document.InsertParagraph("Line 1\nLine 2\nLine 3");
  2484. // Indent all but the first line of the Paragraph.
  2485. p.IndentationHanging = 1.0f;
  2486. // Save all changes made to this document.
  2487. document.Save();
  2488. }
  2489. </code>
  2490. </example>
  2491. </member>
  2492. <member name="P:Novacode.Paragraph.IndentationBefore">
  2493. <summary>
  2494. Set the before indentation in cm for this Paragraph.
  2495. </summary>
  2496. <example>
  2497. // Indent an entire Paragraph from the left.
  2498. <code>
  2499. // Create a new document.
  2500. using (DocX document = DocX.Create("Test.docx"))
  2501. {
  2502. // Create a new Paragraph.
  2503. Paragraph p = document.InsertParagraph("Line 1\nLine 2\nLine 3");
  2504. // Indent this entire Paragraph from the left.
  2505. p.IndentationBefore = 2.0f;
  2506. // Save all changes made to this document.
  2507. document.Save();
  2508. }
  2509. </code>
  2510. </example>
  2511. </member>
  2512. <member name="P:Novacode.Paragraph.IndentationAfter">
  2513. <summary>
  2514. Set the after indentation in cm for this Paragraph.
  2515. </summary>
  2516. <example>
  2517. // Indent an entire Paragraph from the right.
  2518. <code>
  2519. // Create a new document.
  2520. using (DocX document = DocX.Create("Test.docx"))
  2521. {
  2522. // Create a new Paragraph.
  2523. Paragraph p = document.InsertParagraph("Line 1\nLine 2\nLine 3");
  2524. // Make the content of this Paragraph flow right to left.
  2525. p.Direction = Direction.RightToLeft;
  2526. // Indent this entire Paragraph from the right.
  2527. p.IndentationAfter = 2.0f;
  2528. // Save all changes made to this document.
  2529. document.Save();
  2530. }
  2531. </code>
  2532. </example>
  2533. </member>
  2534. <member name="M:Novacode.Paragraph.InsertTableBeforeSelf(System.Int32,System.Int32)">
  2535. <summary>
  2536. Insert a new Table into this document before this Paragraph.
  2537. </summary>
  2538. <param name="rowCount">The number of rows this Table should have.</param>
  2539. <param name="columnCount">The number of columns this Table should have.</param>
  2540. <returns>A new Table inserted before this Paragraph.</returns>
  2541. <example>
  2542. <code>
  2543. // Create a new document.
  2544. using (DocX document = DocX.Create(@"Test.docx"))
  2545. {
  2546. //Insert a Paragraph into this document.
  2547. Paragraph p = document.InsertParagraph("Hello World", false);
  2548. // Insert a new Table before this Paragraph.
  2549. Table newTable = p.InsertTableBeforeSelf(2, 2);
  2550. newTable.Design = TableDesign.LightShadingAccent2;
  2551. newTable.Alignment = Alignment.center;
  2552. // Save all changes made to this document.
  2553. document.Save();
  2554. }// Release this document from memory.
  2555. </code>
  2556. </example>
  2557. </member>
  2558. <member name="M:Novacode.Paragraph.InsertTableAfterSelf(Novacode.Table)">
  2559. <summary>
  2560. Insert a new Table after this Paragraph.
  2561. </summary>
  2562. <param name="t">The Table t to be inserted.</param>
  2563. <returns>A new Table inserted after this Paragraph.</returns>
  2564. <example>
  2565. Insert a new Table after this Paragraph.
  2566. <code>
  2567. // Place holder for a Table.
  2568. Table t;
  2569. // Load document a.
  2570. using (DocX documentA = DocX.Load(@"a.docx"))
  2571. {
  2572. // Get the first Table from this document.
  2573. t = documentA.Tables[0];
  2574. }
  2575. // Load document b.
  2576. using (DocX documentB = DocX.Load(@"b.docx"))
  2577. {
  2578. // Get the first Paragraph in document b.
  2579. Paragraph p2 = documentB.Paragraphs[0];
  2580. // Insert the Table from document a after this Paragraph.
  2581. Table newTable = p2.InsertTableAfterSelf(t);
  2582. // Save all changes made to document b.
  2583. documentB.Save();
  2584. }// Release this document from memory.
  2585. </code>
  2586. </example>
  2587. </member>
  2588. <member name="M:Novacode.Paragraph.InsertTableAfterSelf(System.Int32,System.Int32)">
  2589. <summary>
  2590. Insert a new Table into this document after this Paragraph.
  2591. </summary>
  2592. <param name="rowCount">The number of rows this Table should have.</param>
  2593. <param name="columnCount">The number of columns this Table should have.</param>
  2594. <returns>A new Table inserted after this Paragraph.</returns>
  2595. <example>
  2596. <code>
  2597. // Create a new document.
  2598. using (DocX document = DocX.Create(@"Test.docx"))
  2599. {
  2600. //Insert a Paragraph into this document.
  2601. Paragraph p = document.InsertParagraph("Hello World", false);
  2602. // Insert a new Table after this Paragraph.
  2603. Table newTable = p.InsertTableAfterSelf(2, 2);
  2604. newTable.Design = TableDesign.LightShadingAccent2;
  2605. newTable.Alignment = Alignment.center;
  2606. // Save all changes made to this document.
  2607. document.Save();
  2608. }// Release this document from memory.
  2609. </code>
  2610. </example>
  2611. </member>
  2612. <member name="M:Novacode.Paragraph.InsertParagraphBeforeSelf(Novacode.Paragraph)">
  2613. <summary>
  2614. Insert a Paragraph before this Paragraph, this Paragraph may have come from the same or another document.
  2615. </summary>
  2616. <param name="p">The Paragraph to insert.</param>
  2617. <returns>The Paragraph now associated with this document.</returns>
  2618. <example>
  2619. Take a Paragraph from document a, and insert it into document b before this Paragraph.
  2620. <code>
  2621. // Place holder for a Paragraph.
  2622. Paragraph p;
  2623. // Load document a.
  2624. using (DocX documentA = DocX.Load(@"a.docx"))
  2625. {
  2626. // Get the first paragraph from this document.
  2627. p = documentA.Paragraphs[0];
  2628. }
  2629. // Load document b.
  2630. using (DocX documentB = DocX.Load(@"b.docx"))
  2631. {
  2632. // Get the first Paragraph in document b.
  2633. Paragraph p2 = documentB.Paragraphs[0];
  2634. // Insert the Paragraph from document a before this Paragraph.
  2635. Paragraph newParagraph = p2.InsertParagraphBeforeSelf(p);
  2636. // Save all changes made to document b.
  2637. documentB.Save();
  2638. }// Release this document from memory.
  2639. </code>
  2640. </example>
  2641. </member>
  2642. <member name="M:Novacode.Paragraph.InsertParagraphBeforeSelf(System.String)">
  2643. <summary>
  2644. Insert a new Paragraph before this Paragraph.
  2645. </summary>
  2646. <param name="text">The initial text for this new Paragraph.</param>
  2647. <returns>A new Paragraph inserted before this Paragraph.</returns>
  2648. <example>
  2649. Insert a new paragraph before the first Paragraph in this document.
  2650. <code>
  2651. // Create a new document.
  2652. using (DocX document = DocX.Create(@"Test.docx"))
  2653. {
  2654. // Insert a Paragraph into this document.
  2655. Paragraph p = document.InsertParagraph("I am a Paragraph", false);
  2656. p.InsertParagraphBeforeSelf("I was inserted before the next Paragraph.");
  2657. // Save all changes made to this new document.
  2658. document.Save();
  2659. }// Release this new document form memory.
  2660. </code>
  2661. </example>
  2662. </member>
  2663. <member name="M:Novacode.Paragraph.InsertParagraphBeforeSelf(System.String,System.Boolean)">
  2664. <summary>
  2665. Insert a new Paragraph before this Paragraph.
  2666. </summary>
  2667. <param name="text">The initial text for this new Paragraph.</param>
  2668. <param name="trackChanges">Should this insertion be tracked as a change?</param>
  2669. <returns>A new Paragraph inserted before this Paragraph.</returns>
  2670. <example>
  2671. Insert a new paragraph before the first Paragraph in this document.
  2672. <code>
  2673. // Create a new document.
  2674. using (DocX document = DocX.Create(@"Test.docx"))
  2675. {
  2676. // Insert a Paragraph into this document.
  2677. Paragraph p = document.InsertParagraph("I am a Paragraph", false);
  2678. p.InsertParagraphBeforeSelf("I was inserted before the next Paragraph.", false);
  2679. // Save all changes made to this new document.
  2680. document.Save();
  2681. }// Release this new document form memory.
  2682. </code>
  2683. </example>
  2684. </member>
  2685. <member name="M:Novacode.Paragraph.InsertParagraphBeforeSelf(System.String,System.Boolean,Novacode.Formatting)">
  2686. <summary>
  2687. Insert a new Paragraph before this Paragraph.
  2688. </summary>
  2689. <param name="text">The initial text for this new Paragraph.</param>
  2690. <param name="trackChanges">Should this insertion be tracked as a change?</param>
  2691. <param name="formatting">The formatting to apply to this insertion.</param>
  2692. <returns>A new Paragraph inserted before this Paragraph.</returns>
  2693. <example>
  2694. Insert a new paragraph before the first Paragraph in this document.
  2695. <code>
  2696. // Create a new document.
  2697. using (DocX document = DocX.Create(@"Test.docx"))
  2698. {
  2699. // Insert a Paragraph into this document.
  2700. Paragraph p = document.InsertParagraph("I am a Paragraph", false);
  2701. Formatting boldFormatting = new Formatting();
  2702. boldFormatting.Bold = true;
  2703. p.InsertParagraphBeforeSelf("I was inserted before the next Paragraph.", false, boldFormatting);
  2704. // Save all changes made to this new document.
  2705. document.Save();
  2706. }// Release this new document form memory.
  2707. </code>
  2708. </example>
  2709. </member>
  2710. <member name="M:Novacode.Paragraph.InsertPageBreakBeforeSelf">
  2711. <summary>
  2712. Insert a page break before a Paragraph.
  2713. </summary>
  2714. <example>
  2715. Insert 2 Paragraphs into a document with a page break between them.
  2716. <code>
  2717. using (DocX document = DocX.Create(@"Test.docx"))
  2718. {
  2719. // Insert a new Paragraph.
  2720. Paragraph p1 = document.InsertParagraph("Paragraph 1", false);
  2721. // Insert a new Paragraph.
  2722. Paragraph p2 = document.InsertParagraph("Paragraph 2", false);
  2723. // Insert a page break before Paragraph two.
  2724. p2.InsertPageBreakBeforeSelf();
  2725. // Save this document.
  2726. document.Save();
  2727. }// Release this document from memory.
  2728. </code>
  2729. </example>
  2730. </member>
  2731. <member name="M:Novacode.Paragraph.InsertPageBreakAfterSelf">
  2732. <summary>
  2733. Insert a page break after a Paragraph.
  2734. </summary>
  2735. <example>
  2736. Insert 2 Paragraphs into a document with a page break between them.
  2737. <code>
  2738. using (DocX document = DocX.Create(@"Test.docx"))
  2739. {
  2740. // Insert a new Paragraph.
  2741. Paragraph p1 = document.InsertParagraph("Paragraph 1", false);
  2742. // Insert a page break after this Paragraph.
  2743. p1.InsertPageBreakAfterSelf();
  2744. // Insert a new Paragraph.
  2745. Paragraph p2 = document.InsertParagraph("Paragraph 2", false);
  2746. // Save this document.
  2747. document.Save();
  2748. }// Release this document from memory.
  2749. </code>
  2750. </example>
  2751. </member>
  2752. <member name="M:Novacode.Paragraph.InsertHyperlink(Novacode.Hyperlink,System.Int32)">
  2753. <summary>
  2754. This function inserts a hyperlink into a Paragraph at a specified character index.
  2755. </summary>
  2756. <param name="index">The index to insert at.</param>
  2757. <param name="h">The hyperlink to insert.</param>
  2758. <returns>The Paragraph with the Hyperlink inserted at the specified index.</returns>
  2759. <!--
  2760. This function was added by Brian Campbell aka chickendelicious on Jun 16 2010
  2761. Thank you Brian.
  2762. -->
  2763. </member>
  2764. <member name="M:Novacode.Paragraph.RemoveHyperlink(System.Int32)">
  2765. <summary>
  2766. Remove the Hyperlink at the provided index. The first hyperlink is at index 0.
  2767. Using a negative index or an index greater than the index of the last hyperlink will cause an ArgumentOutOfRangeException() to be thrown.
  2768. </summary>
  2769. <param name="index">The index of the hyperlink to be removed.</param>
  2770. <example>
  2771. <code>
  2772. // Crete a new document.
  2773. using (DocX document = DocX.Create("Test.docx"))
  2774. {
  2775. // Add a Hyperlink into this document.
  2776. Hyperlink h = document.AddHyperlink("link", new Uri("http://www.google.com"));
  2777. // Insert a new Paragraph into the document.
  2778. Paragraph p1 = document.InsertParagraph("AC");
  2779. // Insert the hyperlink into this Paragraph.
  2780. p1.InsertHyperlink(1, h);
  2781. Assert.IsTrue(p1.Text == "AlinkC"); // Make sure the hyperlink was inserted correctly;
  2782. // Remove the hyperlink
  2783. p1.RemoveHyperlink(0);
  2784. Assert.IsTrue(p1.Text == "AC"); // Make sure the hyperlink was removed correctly;
  2785. }
  2786. </code>
  2787. </example>
  2788. </member>
  2789. <member name="M:Novacode.Paragraph.InsertParagraphAfterSelf(Novacode.Paragraph)">
  2790. <summary>
  2791. Insert a Paragraph after this Paragraph, this Paragraph may have come from the same or another document.
  2792. </summary>
  2793. <param name="p">The Paragraph to insert.</param>
  2794. <returns>The Paragraph now associated with this document.</returns>
  2795. <example>
  2796. Take a Paragraph from document a, and insert it into document b after this Paragraph.
  2797. <code>
  2798. // Place holder for a Paragraph.
  2799. Paragraph p;
  2800. // Load document a.
  2801. using (DocX documentA = DocX.Load(@"a.docx"))
  2802. {
  2803. // Get the first paragraph from this document.
  2804. p = documentA.Paragraphs[0];
  2805. }
  2806. // Load document b.
  2807. using (DocX documentB = DocX.Load(@"b.docx"))
  2808. {
  2809. // Get the first Paragraph in document b.
  2810. Paragraph p2 = documentB.Paragraphs[0];
  2811. // Insert the Paragraph from document a after this Paragraph.
  2812. Paragraph newParagraph = p2.InsertParagraphAfterSelf(p);
  2813. // Save all changes made to document b.
  2814. documentB.Save();
  2815. }// Release this document from memory.
  2816. </code>
  2817. </example>
  2818. </member>
  2819. <member name="M:Novacode.Paragraph.InsertParagraphAfterSelf(System.String,System.Boolean,Novacode.Formatting)">
  2820. <summary>
  2821. Insert a new Paragraph after this Paragraph.
  2822. </summary>
  2823. <param name="text">The initial text for this new Paragraph.</param>
  2824. <param name="trackChanges">Should this insertion be tracked as a change?</param>
  2825. <param name="formatting">The formatting to apply to this insertion.</param>
  2826. <returns>A new Paragraph inserted after this Paragraph.</returns>
  2827. <example>
  2828. Insert a new paragraph after the first Paragraph in this document.
  2829. <code>
  2830. // Create a new document.
  2831. using (DocX document = DocX.Create(@"Test.docx"))
  2832. {
  2833. // Insert a Paragraph into this document.
  2834. Paragraph p = document.InsertParagraph("I am a Paragraph", false);
  2835. Formatting boldFormatting = new Formatting();
  2836. boldFormatting.Bold = true;
  2837. p.InsertParagraphAfterSelf("I was inserted after the previous Paragraph.", false, boldFormatting);
  2838. // Save all changes made to this new document.
  2839. document.Save();
  2840. }// Release this new document form memory.
  2841. </code>
  2842. </example>
  2843. </member>
  2844. <member name="M:Novacode.Paragraph.InsertParagraphAfterSelf(System.String,System.Boolean)">
  2845. <summary>
  2846. Insert a new Paragraph after this Paragraph.
  2847. </summary>
  2848. <param name="text">The initial text for this new Paragraph.</param>
  2849. <param name="trackChanges">Should this insertion be tracked as a change?</param>
  2850. <returns>A new Paragraph inserted after this Paragraph.</returns>
  2851. <example>
  2852. Insert a new paragraph after the first Paragraph in this document.
  2853. <code>
  2854. // Create a new document.
  2855. using (DocX document = DocX.Create(@"Test.docx"))
  2856. {
  2857. // Insert a Paragraph into this document.
  2858. Paragraph p = document.InsertParagraph("I am a Paragraph", false);
  2859. p.InsertParagraphAfterSelf("I was inserted after the previous Paragraph.", false);
  2860. // Save all changes made to this new document.
  2861. document.Save();
  2862. }// Release this new document form memory.
  2863. </code>
  2864. </example>
  2865. </member>
  2866. <member name="M:Novacode.Paragraph.InsertParagraphAfterSelf(System.String)">
  2867. <summary>
  2868. Insert a new Paragraph after this Paragraph.
  2869. </summary>
  2870. <param name="text">The initial text for this new Paragraph.</param>
  2871. <returns>A new Paragraph inserted after this Paragraph.</returns>
  2872. <example>
  2873. Insert a new paragraph after the first Paragraph in this document.
  2874. <code>
  2875. // Create a new document.
  2876. using (DocX document = DocX.Create(@"Test.docx"))
  2877. {
  2878. // Insert a Paragraph into this document.
  2879. Paragraph p = document.InsertParagraph("I am a Paragraph", false);
  2880. p.InsertParagraphAfterSelf("I was inserted after the previous Paragraph.");
  2881. // Save all changes made to this new document.
  2882. document.Save();
  2883. }// Release this new document form memory.
  2884. </code>
  2885. </example>
  2886. </member>
  2887. <member name="P:Novacode.Paragraph.Alignment">
  2888. <summary>
  2889. Gets or set this Paragraphs text alignment.
  2890. </summary>
  2891. </member>
  2892. <member name="M:Novacode.Paragraph.Remove(System.Boolean)">
  2893. <summary>
  2894. Remove this Paragraph from the document.
  2895. </summary>
  2896. <param name="trackChanges">Should this remove be tracked as a change?</param>
  2897. <example>
  2898. Remove a Paragraph from a document and track it as a change.
  2899. <code>
  2900. // Create a document using a relative filename.
  2901. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  2902. {
  2903. // Create and Insert a new Paragraph into this document.
  2904. Paragraph p = document.InsertParagraph("Hello", false);
  2905. // Remove the Paragraph and track this as a change.
  2906. p.Remove(true);
  2907. // Save all changes made to this document.
  2908. document.Save();
  2909. }// Release this document from memory.
  2910. </code>
  2911. </example>
  2912. </member>
  2913. <member name="P:Novacode.Paragraph.Text">
  2914. <summary>
  2915. Gets the text value of this Paragraph.
  2916. </summary>
  2917. </member>
  2918. <member name="P:Novacode.Paragraph.MagicText">
  2919. <summary>
  2920. Gets the formatted text value of this Paragraph.
  2921. </summary>
  2922. </member>
  2923. <member name="M:Novacode.Paragraph.CreatePicture(Novacode.DocX,System.String,System.String,System.String)">
  2924. <summary>
  2925. Create a new Picture.
  2926. </summary>
  2927. <param name="document"></param>
  2928. <param name="id">A unique id that identifies an Image embedded in this document.</param>
  2929. <param name="name">The name of this Picture.</param>
  2930. <param name="descr">The description of this Picture.</param>
  2931. </member>
  2932. <member name="M:Novacode.Paragraph.CreateEdit(Novacode.EditType,System.DateTime,System.Object)">
  2933. <summary>
  2934. Creates an Edit either a ins or a del with the specified content and date
  2935. </summary>
  2936. <param name="t">The type of this edit (ins or del)</param>
  2937. <param name="edit_time">The time stamp to use for this edit</param>
  2938. <param name="content">The initial content of this edit</param>
  2939. <returns></returns>
  2940. </member>
  2941. <member name="M:Novacode.Paragraph.GetElementTextLength(System.Xml.Linq.XElement)">
  2942. <!--
  2943. Bug found and fixed by krugs525 on August 12 2009.
  2944. Use TFS compare to see exact code change.
  2945. -->
  2946. </member>
  2947. <member name="M:Novacode.Paragraph.InsertText(System.String,System.Boolean,Novacode.Formatting)">
  2948. <summary>
  2949. Inserts a specified instance of System.String into a Novacode.DocX.Paragraph at a specified index position.
  2950. </summary>
  2951. <example>
  2952. <code>
  2953. // Create a document using a relative filename.
  2954. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  2955. {
  2956. // Create a text formatting.
  2957. Formatting f = new Formatting();
  2958. f.FontColor = Color.Red;
  2959. f.Size = 30;
  2960. // Iterate through the Paragraphs in this document.
  2961. foreach (Paragraph p in document.Paragraphs)
  2962. {
  2963. // Insert the string "Start: " at the begining of every Paragraph and flag it as a change.
  2964. p.InsertText("Start: ", true, f);
  2965. }
  2966. // Save all changes made to this document.
  2967. document.Save();
  2968. }// Release this document from memory.
  2969. </code>
  2970. </example>
  2971. <example>
  2972. Inserting tabs using the \t switch.
  2973. <code>
  2974. // Create a document using a relative filename.
  2975. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  2976. {
  2977. // Create a text formatting.
  2978. Formatting f = new Formatting();
  2979. f.FontColor = Color.Red;
  2980. f.Size = 30;
  2981. // Iterate through the paragraphs in this document.
  2982. foreach (Paragraph p in document.Paragraphs)
  2983. {
  2984. // Insert the string "\tEnd" at the end of every paragraph and flag it as a change.
  2985. p.InsertText("\tEnd", true, f);
  2986. }
  2987. // Save all changes made to this document.
  2988. document.Save();
  2989. }// Release this document from memory.
  2990. </code>
  2991. </example>
  2992. <seealso cref="M:Novacode.Paragraph.RemoveText(System.Int32,System.Boolean)"/>
  2993. <seealso cref="M:Novacode.Paragraph.RemoveText(System.Int32,System.Int32,System.Boolean,System.Boolean)"/>
  2994. <param name="value">The System.String to insert.</param>
  2995. <param name="trackChanges">Flag this insert as a change.</param>
  2996. <param name="formatting">The text formatting.</param>
  2997. </member>
  2998. <member name="M:Novacode.Paragraph.InsertText(System.Int32,System.String,System.Boolean,Novacode.Formatting)">
  2999. <summary>
  3000. Inserts a specified instance of System.String into a Novacode.DocX.Paragraph at a specified index position.
  3001. </summary>
  3002. <example>
  3003. <code>
  3004. // Create a document using a relative filename.
  3005. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  3006. {
  3007. // Create a text formatting.
  3008. Formatting f = new Formatting();
  3009. f.FontColor = Color.Red;
  3010. f.Size = 30;
  3011. // Iterate through the Paragraphs in this document.
  3012. foreach (Paragraph p in document.Paragraphs)
  3013. {
  3014. // Insert the string "Start: " at the begining of every Paragraph and flag it as a change.
  3015. p.InsertText(0, "Start: ", true, f);
  3016. }
  3017. // Save all changes made to this document.
  3018. document.Save();
  3019. }// Release this document from memory.
  3020. </code>
  3021. </example>
  3022. <example>
  3023. Inserting tabs using the \t switch.
  3024. <code>
  3025. // Create a document using a relative filename.
  3026. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  3027. {
  3028. // Create a text formatting.
  3029. Formatting f = new Formatting();
  3030. f.FontColor = Color.Red;
  3031. f.Size = 30;
  3032. // Iterate through the paragraphs in this document.
  3033. foreach (Paragraph p in document.Paragraphs)
  3034. {
  3035. // Insert the string "\tStart:\t" at the begining of every paragraph and flag it as a change.
  3036. p.InsertText(0, "\tStart:\t", true, f);
  3037. }
  3038. // Save all changes made to this document.
  3039. document.Save();
  3040. }// Release this document from memory.
  3041. </code>
  3042. </example>
  3043. <seealso cref="M:Novacode.Paragraph.RemoveText(System.Int32,System.Boolean)"/>
  3044. <seealso cref="M:Novacode.Paragraph.RemoveText(System.Int32,System.Int32,System.Boolean,System.Boolean)"/>
  3045. <param name="index">The index position of the insertion.</param>
  3046. <param name="value">The System.String to insert.</param>
  3047. <param name="trackChanges">Flag this insert as a change.</param>
  3048. <param name="formatting">The text formatting.</param>
  3049. </member>
  3050. <member name="M:Novacode.Paragraph.CurentCulture">
  3051. <summary>
  3052. For use with Append() and AppendLine()
  3053. </summary>
  3054. <returns>This Paragraph in curent culture</returns>
  3055. <example>
  3056. Add a new Paragraph with russian text to this document and then set language of text to local culture.
  3057. <code>
  3058. // Load a document.
  3059. using (DocX document = DocX.Create(@"Test.docx"))
  3060. {
  3061. // Insert a new Paragraph with russian text and set curent local culture to it.
  3062. Paragraph p = document.InsertParagraph("Привет мир!").CurentCulture();
  3063. // Save this document.
  3064. document.Save();
  3065. }
  3066. </code>
  3067. </example>
  3068. </member>
  3069. <member name="M:Novacode.Paragraph.Culture(System.Globalization.CultureInfo)">
  3070. <summary>
  3071. For use with Append() and AppendLine()
  3072. </summary>
  3073. <param name="culture">The CultureInfo for text</param>
  3074. <returns>This Paragraph in curent culture</returns>
  3075. <example>
  3076. Add a new Paragraph with russian text to this document and then set language of text to local culture.
  3077. <code>
  3078. // Load a document.
  3079. using (DocX document = DocX.Create(@"Test.docx"))
  3080. {
  3081. // Insert a new Paragraph with russian text and set specific culture to it.
  3082. Paragraph p = document.InsertParagraph("Привет мир").Culture(CultureInfo.CreateSpecificCulture("ru-RU"));
  3083. // Save this document.
  3084. document.Save();
  3085. }
  3086. </code>
  3087. </example>
  3088. </member>
  3089. <member name="M:Novacode.Paragraph.Append(System.String)">
  3090. <summary>
  3091. Append text to this Paragraph.
  3092. </summary>
  3093. <param name="text">The text to append.</param>
  3094. <returns>This Paragraph with the new text appened.</returns>
  3095. <example>
  3096. Add a new Paragraph to this document and then append some text to it.
  3097. <code>
  3098. // Load a document.
  3099. using (DocX document = DocX.Create(@"Test.docx"))
  3100. {
  3101. // Insert a new Paragraph and Append some text to it.
  3102. Paragraph p = document.InsertParagraph().Append("Hello World!!!");
  3103. // Save this document.
  3104. document.Save();
  3105. }
  3106. </code>
  3107. </example>
  3108. </member>
  3109. <member name="M:Novacode.Paragraph.AppendHyperlink(Novacode.Hyperlink)">
  3110. <summary>
  3111. Append a hyperlink to a Paragraph.
  3112. </summary>
  3113. <param name="h">The hyperlink to append.</param>
  3114. <returns>The Paragraph with the hyperlink appended.</returns>
  3115. <example>
  3116. Creates a Paragraph with some text and a hyperlink.
  3117. <code>
  3118. // Create a document.
  3119. using (DocX document = DocX.Create(@"Test.docx"))
  3120. {
  3121. // Add a hyperlink to this document.
  3122. Hyperlink h = document.AddHyperlink("Google", new Uri("http://www.google.com"));
  3123. // Add a new Paragraph to this document.
  3124. Paragraph p = document.InsertParagraph();
  3125. p.Append("My favourite search engine is ");
  3126. p.AppendHyperlink(h);
  3127. p.Append(", I think it's great.");
  3128. // Save all changes made to this document.
  3129. document.Save();
  3130. }
  3131. </code>
  3132. </example>
  3133. </member>
  3134. <member name="M:Novacode.Paragraph.AppendPicture(Novacode.Picture)">
  3135. <summary>
  3136. Add an image to a document, create a custom view of that image (picture) and then insert it into a Paragraph using append.
  3137. </summary>
  3138. <param name="p">The Picture to append.</param>
  3139. <returns>The Paragraph with the Picture now appended.</returns>
  3140. <example>
  3141. Add an image to a document, create a custom view of that image (picture) and then insert it into a Paragraph using append.
  3142. <code>
  3143. using (DocX document = DocX.Create("Test.docx"))
  3144. {
  3145. // Add an image to the document.
  3146. Image i = document.AddImage(@"Image.jpg");
  3147. // Create a picture i.e. (A custom view of an image)
  3148. Picture p = i.CreatePicture();
  3149. p.FlipHorizontal = true;
  3150. p.Rotation = 10;
  3151. // Create a new Paragraph.
  3152. Paragraph par = document.InsertParagraph();
  3153. // Append content to the Paragraph.
  3154. par.Append("Here is a cool picture")
  3155. .AppendPicture(p)
  3156. .Append(" don't you think so?");
  3157. // Save all changes made to this document.
  3158. document.Save();
  3159. }
  3160. </code>
  3161. </example>
  3162. </member>
  3163. <member name="M:Novacode.Paragraph.AppendEquation(System.String)">
  3164. <summary>
  3165. Add an equation to a document.
  3166. </summary>
  3167. <param name="equation">The Equation to append.</param>
  3168. <returns>The Paragraph with the Equation now appended.</returns>
  3169. <example>
  3170. Add an equation to a document.
  3171. <code>
  3172. using (DocX document = DocX.Create("Test.docx"))
  3173. {
  3174. // Add an equation to the document.
  3175. document.AddEquation("x=y+z");
  3176. // Save all changes made to this document.
  3177. document.Save();
  3178. }
  3179. </code>
  3180. </example>
  3181. </member>
  3182. <member name="M:Novacode.Paragraph.InsertPicture(Novacode.Picture,System.Int32)">
  3183. <summary>
  3184. Insert a Picture into a Paragraph at the given text index.
  3185. If not index is provided defaults to 0.
  3186. </summary>
  3187. <param name="p">The Picture to insert.</param>
  3188. <param name="index">The text index to insert at.</param>
  3189. <returns>The modified Paragraph.</returns>
  3190. <example>
  3191. <code>
  3192. Load test document.
  3193. using (DocX document = DocX.Create("Test.docx"))
  3194. {
  3195. // Add Headers and Footers into this document.
  3196. document.AddHeaders();
  3197. document.AddFooters();
  3198. document.DifferentFirstPage = true;
  3199. document.DifferentOddAndEvenPages = true;
  3200. // Add an Image to this document.
  3201. Novacode.Image img = document.AddImage(directory_documents + "purple.png");
  3202. // Create a Picture from this Image.
  3203. Picture pic = img.CreatePicture();
  3204. // Main document.
  3205. Paragraph p0 = document.InsertParagraph("Hello");
  3206. p0.InsertPicture(pic, 3);
  3207. // Header first.
  3208. Paragraph p1 = document.Headers.first.InsertParagraph("----");
  3209. p1.InsertPicture(pic, 2);
  3210. // Header odd.
  3211. Paragraph p2 = document.Headers.odd.InsertParagraph("----");
  3212. p2.InsertPicture(pic, 2);
  3213. // Header even.
  3214. Paragraph p3 = document.Headers.even.InsertParagraph("----");
  3215. p3.InsertPicture(pic, 2);
  3216. // Footer first.
  3217. Paragraph p4 = document.Footers.first.InsertParagraph("----");
  3218. p4.InsertPicture(pic, 2);
  3219. // Footer odd.
  3220. Paragraph p5 = document.Footers.odd.InsertParagraph("----");
  3221. p5.InsertPicture(pic, 2);
  3222. // Footer even.
  3223. Paragraph p6 = document.Footers.even.InsertParagraph("----");
  3224. p6.InsertPicture(pic, 2);
  3225. // Save this document.
  3226. document.Save();
  3227. }
  3228. </code>
  3229. </example>
  3230. </member>
  3231. <member name="M:Novacode.Paragraph.AppendLine(System.String)">
  3232. <summary>
  3233. Append text on a new line to this Paragraph.
  3234. </summary>
  3235. <param name="text">The text to append.</param>
  3236. <returns>This Paragraph with the new text appened.</returns>
  3237. <example>
  3238. Add a new Paragraph to this document and then append a new line with some text to it.
  3239. <code>
  3240. // Load a document.
  3241. using (DocX document = DocX.Create(@"Test.docx"))
  3242. {
  3243. // Insert a new Paragraph and Append a new line with some text to it.
  3244. Paragraph p = document.InsertParagraph().AppendLine("Hello World!!!");
  3245. // Save this document.
  3246. document.Save();
  3247. }
  3248. </code>
  3249. </example>
  3250. </member>
  3251. <member name="M:Novacode.Paragraph.AppendLine">
  3252. <summary>
  3253. Append a new line to this Paragraph.
  3254. </summary>
  3255. <returns>This Paragraph with a new line appeneded.</returns>
  3256. <example>
  3257. Add a new Paragraph to this document and then append a new line to it.
  3258. <code>
  3259. // Load a document.
  3260. using (DocX document = DocX.Create(@"Test.docx"))
  3261. {
  3262. // Insert a new Paragraph and Append a new line with some text to it.
  3263. Paragraph p = document.InsertParagraph().AppendLine();
  3264. // Save this document.
  3265. document.Save();
  3266. }
  3267. </code>
  3268. </example>
  3269. </member>
  3270. <member name="M:Novacode.Paragraph.Bold">
  3271. <summary>
  3272. For use with Append() and AppendLine()
  3273. </summary>
  3274. <returns>This Paragraph with the last appended text bold.</returns>
  3275. <example>
  3276. Append text to this Paragraph and then make it bold.
  3277. <code>
  3278. // Create a document.
  3279. using (DocX document = DocX.Create(@"Test.docx"))
  3280. {
  3281. // Insert a new Paragraph.
  3282. Paragraph p = document.InsertParagraph();
  3283. p.Append("I am ")
  3284. .Append("Bold").Bold()
  3285. .Append(" I am not");
  3286. // Save this document.
  3287. document.Save();
  3288. }// Release this document from memory.
  3289. </code>
  3290. </example>
  3291. </member>
  3292. <member name="M:Novacode.Paragraph.Italic">
  3293. <summary>
  3294. For use with Append() and AppendLine()
  3295. </summary>
  3296. <returns>This Paragraph with the last appended text italic.</returns>
  3297. <example>
  3298. Append text to this Paragraph and then make it italic.
  3299. <code>
  3300. // Create a document.
  3301. using (DocX document = DocX.Create(@"Test.docx"))
  3302. {
  3303. // Insert a new Paragraph.
  3304. Paragraph p = document.InsertParagraph();
  3305. p.Append("I am ")
  3306. .Append("Italic").Italic()
  3307. .Append(" I am not");
  3308. // Save this document.
  3309. document.Save();
  3310. }// Release this document from memory.
  3311. </code>
  3312. </example>
  3313. </member>
  3314. <member name="M:Novacode.Paragraph.Color(System.Drawing.Color)">
  3315. <summary>
  3316. For use with Append() and AppendLine()
  3317. </summary>
  3318. <param name="c">A color to use on the appended text.</param>
  3319. <returns>This Paragraph with the last appended text colored.</returns>
  3320. <example>
  3321. Append text to this Paragraph and then color it.
  3322. <code>
  3323. // Create a document.
  3324. using (DocX document = DocX.Create(@"Test.docx"))
  3325. {
  3326. // Insert a new Paragraph.
  3327. Paragraph p = document.InsertParagraph();
  3328. p.Append("I am ")
  3329. .Append("Blue").Color(Color.Blue)
  3330. .Append(" I am not");
  3331. // Save this document.
  3332. document.Save();
  3333. }// Release this document from memory.
  3334. </code>
  3335. </example>
  3336. </member>
  3337. <member name="M:Novacode.Paragraph.UnderlineStyle(Novacode.UnderlineStyle)">
  3338. <summary>
  3339. For use with Append() and AppendLine()
  3340. </summary>
  3341. <param name="underlineStyle">The underline style to use for the appended text.</param>
  3342. <returns>This Paragraph with the last appended text underlined.</returns>
  3343. <example>
  3344. Append text to this Paragraph and then underline it.
  3345. <code>
  3346. // Create a document.
  3347. using (DocX document = DocX.Create(@"Test.docx"))
  3348. {
  3349. // Insert a new Paragraph.
  3350. Paragraph p = document.InsertParagraph();
  3351. p.Append("I am ")
  3352. .Append("Underlined").UnderlineStyle(UnderlineStyle.doubleLine)
  3353. .Append(" I am not");
  3354. // Save this document.
  3355. document.Save();
  3356. }// Release this document from memory.
  3357. </code>
  3358. </example>
  3359. </member>
  3360. <member name="P:Novacode.Paragraph.FollowingTable">
  3361. <summary>
  3362. Returns table following the paragraph. Null if the following element isn't table.
  3363. </summary>
  3364. </member>
  3365. <member name="M:Novacode.Paragraph.FontSize(System.Double)">
  3366. <summary>
  3367. For use with Append() and AppendLine()
  3368. </summary>
  3369. <param name="fontSize">The font size to use for the appended text.</param>
  3370. <returns>This Paragraph with the last appended text resized.</returns>
  3371. <example>
  3372. Append text to this Paragraph and then resize it.
  3373. <code>
  3374. // Create a document.
  3375. using (DocX document = DocX.Create(@"Test.docx"))
  3376. {
  3377. // Insert a new Paragraph.
  3378. Paragraph p = document.InsertParagraph();
  3379. p.Append("I am ")
  3380. .Append("Big").FontSize(20)
  3381. .Append(" I am not");
  3382. // Save this document.
  3383. document.Save();
  3384. }// Release this document from memory.
  3385. </code>
  3386. </example>
  3387. </member>
  3388. <member name="M:Novacode.Paragraph.Font(System.String)">
  3389. <summary>
  3390. For use with Append() and AppendLine()
  3391. </summary>
  3392. <param name="fontName">The font to use for the appended text.</param>
  3393. <returns>This Paragraph with the last appended text's font changed.</returns>
  3394. </member>
  3395. <member name="M:Novacode.Paragraph.Font(Novacode.Font)">
  3396. <summary>
  3397. For use with Append() and AppendLine()
  3398. </summary>
  3399. <param name="fontFamily">The font to use for the appended text.</param>
  3400. <returns>This Paragraph with the last appended text's font changed.</returns>
  3401. <example>
  3402. Append text to this Paragraph and then change its font.
  3403. <code>
  3404. // Create a document.
  3405. using (DocX document = DocX.Create(@"Test.docx"))
  3406. {
  3407. // Insert a new Paragraph.
  3408. Paragraph p = document.InsertParagraph();
  3409. p.Append("I am ")
  3410. .Append("Times new roman").Font(new FontFamily("Times new roman"))
  3411. .Append(" I am not");
  3412. // Save this document.
  3413. document.Save();
  3414. }// Release this document from memory.
  3415. </code>
  3416. </example>
  3417. </member>
  3418. <member name="M:Novacode.Paragraph.CapsStyle(Novacode.CapsStyle)">
  3419. <summary>
  3420. For use with Append() and AppendLine()
  3421. </summary>
  3422. <param name="capsStyle">The caps style to apply to the last appended text.</param>
  3423. <returns>This Paragraph with the last appended text's caps style changed.</returns>
  3424. <example>
  3425. Append text to this Paragraph and then set it to full caps.
  3426. <code>
  3427. // Create a document.
  3428. using (DocX document = DocX.Create(@"Test.docx"))
  3429. {
  3430. // Insert a new Paragraph.
  3431. Paragraph p = document.InsertParagraph();
  3432. p.Append("I am ")
  3433. .Append("Capitalized").CapsStyle(CapsStyle.caps)
  3434. .Append(" I am not");
  3435. // Save this document.
  3436. document.Save();
  3437. }// Release this document from memory.
  3438. </code>
  3439. </example>
  3440. </member>
  3441. <member name="M:Novacode.Paragraph.Script(Novacode.Script)">
  3442. <summary>
  3443. For use with Append() and AppendLine()
  3444. </summary>
  3445. <param name="script">The script style to apply to the last appended text.</param>
  3446. <returns>This Paragraph with the last appended text's script style changed.</returns>
  3447. <example>
  3448. Append text to this Paragraph and then set it to superscript.
  3449. <code>
  3450. // Create a document.
  3451. using (DocX document = DocX.Create(@"Test.docx"))
  3452. {
  3453. // Insert a new Paragraph.
  3454. Paragraph p = document.InsertParagraph();
  3455. p.Append("I am ")
  3456. .Append("superscript").Script(Script.superscript)
  3457. .Append(" I am not");
  3458. // Save this document.
  3459. document.Save();
  3460. }// Release this document from memory.
  3461. </code>
  3462. </example>
  3463. </member>
  3464. <member name="M:Novacode.Paragraph.Highlight(Novacode.Highlight)">
  3465. <summary>
  3466. For use with Append() and AppendLine()
  3467. </summary>
  3468. <param name="highlight">The highlight to apply to the last appended text.</param>
  3469. <returns>This Paragraph with the last appended text highlighted.</returns>
  3470. <example>
  3471. Append text to this Paragraph and then highlight it.
  3472. <code>
  3473. // Create a document.
  3474. using (DocX document = DocX.Create(@"Test.docx"))
  3475. {
  3476. // Insert a new Paragraph.
  3477. Paragraph p = document.InsertParagraph();
  3478. p.Append("I am ")
  3479. .Append("highlighted").Highlight(Highlight.green)
  3480. .Append(" I am not");
  3481. // Save this document.
  3482. document.Save();
  3483. }// Release this document from memory.
  3484. </code>
  3485. </example>
  3486. </member>
  3487. <member name="M:Novacode.Paragraph.Misc(Novacode.Misc)">
  3488. <summary>
  3489. For use with Append() and AppendLine()
  3490. </summary>
  3491. <param name="misc">The miscellaneous property to set.</param>
  3492. <returns>This Paragraph with the last appended text changed by a miscellaneous property.</returns>
  3493. <example>
  3494. Append text to this Paragraph and then apply a miscellaneous property.
  3495. <code>
  3496. // Create a document.
  3497. using (DocX document = DocX.Create(@"Test.docx"))
  3498. {
  3499. // Insert a new Paragraph.
  3500. Paragraph p = document.InsertParagraph();
  3501. p.Append("I am ")
  3502. .Append("outlined").Misc(Misc.outline)
  3503. .Append(" I am not");
  3504. // Save this document.
  3505. document.Save();
  3506. }// Release this document from memory.
  3507. </code>
  3508. </example>
  3509. </member>
  3510. <member name="M:Novacode.Paragraph.StrikeThrough(Novacode.StrikeThrough)">
  3511. <summary>
  3512. For use with Append() and AppendLine()
  3513. </summary>
  3514. <param name="strikeThrough">The strike through style to used on the last appended text.</param>
  3515. <returns>This Paragraph with the last appended text striked.</returns>
  3516. <example>
  3517. Append text to this Paragraph and then strike it.
  3518. <code>
  3519. // Create a document.
  3520. using (DocX document = DocX.Create(@"Test.docx"))
  3521. {
  3522. // Insert a new Paragraph.
  3523. Paragraph p = document.InsertParagraph();
  3524. p.Append("I am ")
  3525. .Append("striked").StrikeThrough(StrikeThrough.doubleStrike)
  3526. .Append(" I am not");
  3527. // Save this document.
  3528. document.Save();
  3529. }// Release this document from memory.
  3530. </code>
  3531. </example>
  3532. </member>
  3533. <member name="M:Novacode.Paragraph.UnderlineColor(System.Drawing.Color)">
  3534. <summary>
  3535. For use with Append() and AppendLine()
  3536. </summary>
  3537. <param name="underlineColor">The underline color to use, if no underline is set, a single line will be used.</param>
  3538. <returns>This Paragraph with the last appended text underlined in a color.</returns>
  3539. <example>
  3540. Append text to this Paragraph and then underline it using a color.
  3541. <code>
  3542. // Create a document.
  3543. using (DocX document = DocX.Create(@"Test.docx"))
  3544. {
  3545. // Insert a new Paragraph.
  3546. Paragraph p = document.InsertParagraph();
  3547. p.Append("I am ")
  3548. .Append("color underlined").UnderlineStyle(UnderlineStyle.dotted).UnderlineColor(Color.Orange)
  3549. .Append(" I am not");
  3550. // Save this document.
  3551. document.Save();
  3552. }// Release this document from memory.
  3553. </code>
  3554. </example>
  3555. </member>
  3556. <member name="M:Novacode.Paragraph.Hide">
  3557. <summary>
  3558. For use with Append() and AppendLine()
  3559. </summary>
  3560. <returns>This Paragraph with the last appended text hidden.</returns>
  3561. <example>
  3562. Append text to this Paragraph and then hide it.
  3563. <code>
  3564. // Create a document.
  3565. using (DocX document = DocX.Create(@"Test.docx"))
  3566. {
  3567. // Insert a new Paragraph.
  3568. Paragraph p = document.InsertParagraph();
  3569. p.Append("I am ")
  3570. .Append("hidden").Hide()
  3571. .Append(" I am not");
  3572. // Save this document.
  3573. document.Save();
  3574. }// Release this document from memory.
  3575. </code>
  3576. </example>
  3577. </member>
  3578. <member name="M:Novacode.Paragraph.SetLineSpacing(Novacode.LineSpacingType,System.Single)">
  3579. <summary>
  3580. Set the linespacing for this paragraph manually.
  3581. </summary>
  3582. <param name="spacingType">The type of spacing to be set, can be either Before, After or Line (Standard line spacing).</param>
  3583. <param name="spacingFloat">A float value of the amount of spacing. Equals the value that van be set in Word using the "Line and Paragraph spacing" button.</param>
  3584. </member>
  3585. <member name="M:Novacode.Paragraph.SetLineSpacing(Novacode.LineSpacingTypeAuto)">
  3586. <summary>
  3587. Set the linespacing for this paragraph using the Auto value.
  3588. </summary>
  3589. <param name="spacingType">The type of spacing to be set automatically. Using Auto will set both Before and After. None will remove any linespacing.</param>
  3590. </member>
  3591. <member name="M:Novacode.Paragraph.AppendDocProperty(Novacode.CustomProperty,System.Boolean,Novacode.Formatting)">
  3592. <summary>
  3593. Append a field of type document property, this field will display the custom property cp, at the end of this paragraph.
  3594. </summary>
  3595. <param name="cp">The custom property to display.</param>
  3596. <param name="trackChanges"></param>
  3597. <param name="f">The formatting to use for this text.</param>
  3598. <example>
  3599. Create, add and display a custom property in a document.
  3600. <code>
  3601. // Load a document.
  3602. using (DocX document = DocX.Create("CustomProperty_Add.docx"))
  3603. {
  3604. // Add a few Custom Properties to this document.
  3605. document.AddCustomProperty(new CustomProperty("fname", "cathal"));
  3606. document.AddCustomProperty(new CustomProperty("age", 24));
  3607. document.AddCustomProperty(new CustomProperty("male", true));
  3608. document.AddCustomProperty(new CustomProperty("newyear2012", new DateTime(2012, 1, 1)));
  3609. document.AddCustomProperty(new CustomProperty("fav_num", 3.141592));
  3610. // Insert a new Paragraph and append a load of DocProperties.
  3611. Paragraph p = document.InsertParagraph("fname: ")
  3612. .AppendDocProperty(document.CustomProperties["fname"])
  3613. .Append(", age: ")
  3614. .AppendDocProperty(document.CustomProperties["age"])
  3615. .Append(", male: ")
  3616. .AppendDocProperty(document.CustomProperties["male"])
  3617. .Append(", newyear2012: ")
  3618. .AppendDocProperty(document.CustomProperties["newyear2012"])
  3619. .Append(", fav_num: ")
  3620. .AppendDocProperty(document.CustomProperties["fav_num"]);
  3621. // Save the changes to the document.
  3622. document.Save();
  3623. }
  3624. </code>
  3625. </example>
  3626. </member>
  3627. <member name="M:Novacode.Paragraph.InsertDocProperty(Novacode.CustomProperty,System.Boolean,Novacode.Formatting)">
  3628. <summary>
  3629. Insert a field of type document property, this field will display the custom property cp, at the end of this paragraph.
  3630. </summary>
  3631. <param name="cp">The custom property to display.</param>
  3632. <param name="trackChanges"></param>
  3633. <param name="f">The formatting to use for this text.</param>
  3634. <example>
  3635. Create, add and display a custom property in a document.
  3636. <code>
  3637. // Load a document
  3638. using (DocX document = DocX.Create(@"Test.docx"))
  3639. {
  3640. // Create a custom property.
  3641. CustomProperty name = new CustomProperty("name", "Cathal Coffey");
  3642. // Add this custom property to this document.
  3643. document.AddCustomProperty(name);
  3644. // Create a text formatting.
  3645. Formatting f = new Formatting();
  3646. f.Bold = true;
  3647. f.Size = 14;
  3648. f.StrikeThrough = StrickThrough.strike;
  3649. // Insert a new paragraph.
  3650. Paragraph p = document.InsertParagraph("Author: ", false, f);
  3651. // Insert a field of type document property to display the custom property name and track this change.
  3652. p.InsertDocProperty(name, true, f);
  3653. // Save all changes made to this document.
  3654. document.Save();
  3655. }// Release this document from memory.
  3656. </code>
  3657. </example>
  3658. </member>
  3659. <member name="M:Novacode.Paragraph.RemoveText(System.Int32,System.Int32,System.Boolean,System.Boolean)">
  3660. <summary>
  3661. Removes characters from a Novacode.DocX.Paragraph.
  3662. </summary>
  3663. <example>
  3664. <code>
  3665. // Create a document using a relative filename.
  3666. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  3667. {
  3668. // Iterate through the paragraphs
  3669. foreach (Paragraph p in document.Paragraphs)
  3670. {
  3671. // Remove the first two characters from every paragraph
  3672. p.RemoveText(0, 2, false);
  3673. }
  3674. // Save all changes made to this document.
  3675. document.Save();
  3676. }// Release this document from memory.
  3677. </code>
  3678. </example>
  3679. <seealso cref="M:Novacode.Paragraph.InsertText(System.Int32,System.String,System.Boolean,Novacode.Formatting)"/>
  3680. <seealso cref="M:Novacode.Paragraph.InsertText(System.String,System.Boolean,Novacode.Formatting)"/>
  3681. <param name="index">The position to begin deleting characters.</param>
  3682. <param name="count">The number of characters to delete</param>
  3683. <param name="trackChanges">Track changes</param>
  3684. <param name="removeEmptyParagraph">Remove empty paragraph</param>
  3685. </member>
  3686. <member name="M:Novacode.Paragraph.RemoveText(System.Int32,System.Boolean)">
  3687. <summary>
  3688. Removes characters from a Novacode.DocX.Paragraph.
  3689. </summary>
  3690. <example>
  3691. <code>
  3692. // Create a document using a relative filename.
  3693. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  3694. {
  3695. // Iterate through the paragraphs
  3696. foreach (Paragraph p in document.Paragraphs)
  3697. {
  3698. // Remove all but the first 2 characters from this Paragraph.
  3699. p.RemoveText(2, false);
  3700. }
  3701. // Save all changes made to this document.
  3702. document.Save();
  3703. }// Release this document from memory.
  3704. </code>
  3705. </example>
  3706. <seealso cref="M:Novacode.Paragraph.InsertText(System.Int32,System.String,System.Boolean,Novacode.Formatting)"/>
  3707. <seealso cref="M:Novacode.Paragraph.InsertText(System.String,System.Boolean,Novacode.Formatting)"/>
  3708. <param name="index">The position to begin deleting characters.</param>
  3709. <param name="trackChanges">Track changes</param>
  3710. </member>
  3711. <member name="M:Novacode.Paragraph.ReplaceText(System.String,System.String,System.Boolean,System.Text.RegularExpressions.RegexOptions,Novacode.Formatting,Novacode.Formatting,Novacode.MatchFormattingOptions,System.Boolean,System.Boolean,System.Boolean)">
  3712. <summary>
  3713. Replaces all occurrences of a specified System.String in this instance, with another specified System.String.
  3714. </summary>
  3715. <example>
  3716. <code>
  3717. // Load a document using a relative filename.
  3718. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  3719. {
  3720. // The formatting to match.
  3721. Formatting matchFormatting = new Formatting();
  3722. matchFormatting.Size = 10;
  3723. matchFormatting.Italic = true;
  3724. matchFormatting.FontFamily = new FontFamily("Times New Roman");
  3725. // The formatting to apply to the inserted text.
  3726. Formatting newFormatting = new Formatting();
  3727. newFormatting.Size = 22;
  3728. newFormatting.UnderlineStyle = UnderlineStyle.dotted;
  3729. newFormatting.Bold = true;
  3730. // Iterate through the paragraphs in this document.
  3731. foreach (Paragraph p in document.Paragraphs)
  3732. {
  3733. /*
  3734. * Replace all instances of the string "wrong" with the string "right" and ignore case.
  3735. * Each inserted instance of "wrong" should use the Formatting newFormatting.
  3736. * Only replace an instance of "wrong" if it is Size 10, Italic and Times New Roman.
  3737. * SubsetMatch means that the formatting must contain all elements of the match formatting,
  3738. * but it can also contain additional formatting for example Color, UnderlineStyle, etc.
  3739. * ExactMatch means it must not contain additional formatting.
  3740. */
  3741. p.ReplaceText("wrong", "right", false, RegexOptions.IgnoreCase, newFormatting, matchFormatting, MatchFormattingOptions.SubsetMatch);
  3742. }
  3743. // Save all changes made to this document.
  3744. document.Save();
  3745. }// Release this document from memory.
  3746. </code>
  3747. </example>
  3748. <seealso cref="M:Novacode.Paragraph.RemoveText(System.Int32,System.Int32,System.Boolean,System.Boolean)"/>
  3749. <seealso cref="M:Novacode.Paragraph.RemoveText(System.Int32,System.Boolean)"/>
  3750. <seealso cref="M:Novacode.Paragraph.InsertText(System.Int32,System.String,System.Boolean,Novacode.Formatting)"/>
  3751. <seealso cref="M:Novacode.Paragraph.InsertText(System.String,System.Boolean,Novacode.Formatting)"/>
  3752. <param name="newValue">A System.String to replace all occurrences of oldValue.</param>
  3753. <param name="oldValue">A System.String to be replaced.</param>
  3754. <param name="options">A bitwise OR combination of RegexOption enumeration options.</param>
  3755. <param name="trackChanges">Track changes</param>
  3756. <param name="newFormatting">The formatting to apply to the text being inserted.</param>
  3757. <param name="matchFormatting">The formatting that the text must match in order to be replaced.</param>
  3758. <param name="fo">How should formatting be matched?</param>
  3759. <param name="escapeRegEx">True if the oldValue needs to be escaped, otherwise false. If it represents a valid RegEx pattern this should be false.</param>
  3760. <param name="useRegExSubstitutions">True if RegEx-like replace should be performed, i.e. if newValue contains RegEx substitutions. Does not perform named-group substitutions (only numbered groups).</param>
  3761. <param name="removeEmptyParagraph">Remove empty paragraph</param>
  3762. </member>
  3763. <member name="M:Novacode.Paragraph.ReplaceText(System.String,System.Func{System.String,System.String},System.Boolean,System.Text.RegularExpressions.RegexOptions,Novacode.Formatting,Novacode.Formatting,Novacode.MatchFormattingOptions,System.Boolean)">
  3764. <summary>
  3765. Find pattern regex must return a group match.
  3766. </summary>
  3767. <param name="findPattern">Regex pattern that must include one group match. ie (.*)</param>
  3768. <param name="regexMatchHandler">A func that accepts the matching find grouping text and returns a replacement value</param>
  3769. <param name="trackChanges"></param>
  3770. <param name="options"></param>
  3771. <param name="newFormatting"></param>
  3772. <param name="matchFormatting"></param>
  3773. <param name="fo"></param>
  3774. <param name="removeEmptyParagraph">Remove empty paragraph</param>
  3775. </member>
  3776. <member name="M:Novacode.Paragraph.FindAll(System.String)">
  3777. <summary>
  3778. Find all instances of a string in this paragraph and return their indexes in a List.
  3779. </summary>
  3780. <param name="str">The string to find</param>
  3781. <returns>A list of indexes.</returns>
  3782. <example>
  3783. Find all instances of Hello in this document and insert 'don't' in frount of them.
  3784. <code>
  3785. // Load a document
  3786. using (DocX document = DocX.Load(@"Test.docx"))
  3787. {
  3788. // Loop through the paragraphs in this document.
  3789. foreach(Paragraph p in document.Paragraphs)
  3790. {
  3791. // Find all instances of 'go' in this paragraph.
  3792. <![CDATA[ List<int> ]]> gos = document.FindAll("go");
  3793. /*
  3794. * Insert 'don't' in frount of every instance of 'go' in this document to produce 'don't go'.
  3795. * An important trick here is to do the inserting in reverse document order. If you inserted
  3796. * in document order, every insert would shift the index of the remaining matches.
  3797. */
  3798. gos.Reverse();
  3799. foreach (int index in gos)
  3800. {
  3801. p.InsertText(index, "don't ", false);
  3802. }
  3803. }
  3804. // Save all changes made to this document.
  3805. document.Save();
  3806. }// Release this document from memory.
  3807. </code>
  3808. </example>
  3809. </member>
  3810. <member name="M:Novacode.Paragraph.FindAll(System.String,System.Text.RegularExpressions.RegexOptions)">
  3811. <summary>
  3812. Find all instances of a string in this paragraph and return their indexes in a List.
  3813. </summary>
  3814. <param name="str">The string to find</param>
  3815. <param name="options">The options to use when finding a string match.</param>
  3816. <returns>A list of indexes.</returns>
  3817. <example>
  3818. Find all instances of Hello in this document and insert 'don't' in frount of them.
  3819. <code>
  3820. // Load a document
  3821. using (DocX document = DocX.Load(@"Test.docx"))
  3822. {
  3823. // Loop through the paragraphs in this document.
  3824. foreach(Paragraph p in document.Paragraphs)
  3825. {
  3826. // Find all instances of 'go' in this paragraph (Ignore case).
  3827. <![CDATA[ List<int> ]]> gos = document.FindAll("go", RegexOptions.IgnoreCase);
  3828. /*
  3829. * Insert 'don't' in frount of every instance of 'go' in this document to produce 'don't go'.
  3830. * An important trick here is to do the inserting in reverse document order. If you inserted
  3831. * in document order, every insert would shift the index of the remaining matches.
  3832. */
  3833. gos.Reverse();
  3834. foreach (int index in gos)
  3835. {
  3836. p.InsertText(index, "don't ", false);
  3837. }
  3838. }
  3839. // Save all changes made to this document.
  3840. document.Save();
  3841. }// Release this document from memory.
  3842. </code>
  3843. </example>
  3844. </member>
  3845. <member name="M:Novacode.Paragraph.FindAllByPattern(System.String,System.Text.RegularExpressions.RegexOptions)">
  3846. <summary>
  3847. Find all unique instances of the given Regex Pattern
  3848. </summary>
  3849. <param name="str"></param>
  3850. <param name="options"></param>
  3851. <returns></returns>
  3852. </member>
  3853. <member name="M:Novacode.Paragraph.InsertPageNumber(Novacode.PageNumberFormat,System.Int32)">
  3854. <summary>
  3855. Insert a PageNumber place holder into a Paragraph.
  3856. This place holder should only be inserted into a Header or Footer Paragraph.
  3857. Word will not automatically update this field if it is inserted into a document level Paragraph.
  3858. </summary>
  3859. <param name="pnf">The PageNumberFormat can be normal: (1, 2, ...) or Roman: (I, II, ...)</param>
  3860. <param name="index">The text index to insert this PageNumber place holder at.</param>
  3861. <example>
  3862. <code>
  3863. // Create a new document.
  3864. using (DocX document = DocX.Create(@"Test.docx"))
  3865. {
  3866. // Add Headers to the document.
  3867. document.AddHeaders();
  3868. // Get the default Header.
  3869. Header header = document.Headers.odd;
  3870. // Insert a Paragraph into the Header.
  3871. Paragraph p0 = header.InsertParagraph("Page ( of )");
  3872. // Insert place holders for PageNumber and PageCount into the Header.
  3873. // Word will replace these with the correct value for each Page.
  3874. p0.InsertPageNumber(PageNumberFormat.normal, 6);
  3875. p0.InsertPageCount(PageNumberFormat.normal, 11);
  3876. // Save the document.
  3877. document.Save();
  3878. }
  3879. </code>
  3880. </example>
  3881. <seealso cref="M:Novacode.Paragraph.AppendPageCount(Novacode.PageNumberFormat)"/>
  3882. <seealso cref="M:Novacode.Paragraph.AppendPageNumber(Novacode.PageNumberFormat)"/>
  3883. <seealso cref="M:Novacode.Paragraph.InsertPageCount(Novacode.PageNumberFormat,System.Int32)"/>
  3884. </member>
  3885. <member name="M:Novacode.Paragraph.AppendPageNumber(Novacode.PageNumberFormat)">
  3886. <summary>
  3887. Append a PageNumber place holder onto the end of a Paragraph.
  3888. </summary>
  3889. <param name="pnf">The PageNumberFormat can be normal: (1, 2, ...) or Roman: (I, II, ...)</param>
  3890. <example>
  3891. <code>
  3892. // Create a new document.
  3893. using (DocX document = DocX.Create(@"Test.docx"))
  3894. {
  3895. // Add Headers to the document.
  3896. document.AddHeaders();
  3897. // Get the default Header.
  3898. Header header = document.Headers.odd;
  3899. // Insert a Paragraph into the Header.
  3900. Paragraph p0 = header.InsertParagraph();
  3901. // Appemd place holders for PageNumber and PageCount into the Header.
  3902. // Word will replace these with the correct value for each Page.
  3903. p0.Append("Page (");
  3904. p0.AppendPageNumber(PageNumberFormat.normal);
  3905. p0.Append(" of ");
  3906. p0.AppendPageCount(PageNumberFormat.normal);
  3907. p0.Append(")");
  3908. // Save the document.
  3909. document.Save();
  3910. }
  3911. </code>
  3912. </example>
  3913. <seealso cref="M:Novacode.Paragraph.AppendPageCount(Novacode.PageNumberFormat)"/>
  3914. <seealso cref="M:Novacode.Paragraph.InsertPageNumber(Novacode.PageNumberFormat,System.Int32)"/>
  3915. <seealso cref="M:Novacode.Paragraph.InsertPageCount(Novacode.PageNumberFormat,System.Int32)"/>
  3916. </member>
  3917. <member name="M:Novacode.Paragraph.InsertPageCount(Novacode.PageNumberFormat,System.Int32)">
  3918. <summary>
  3919. Insert a PageCount place holder into a Paragraph.
  3920. This place holder should only be inserted into a Header or Footer Paragraph.
  3921. Word will not automatically update this field if it is inserted into a document level Paragraph.
  3922. </summary>
  3923. <param name="pnf">The PageNumberFormat can be normal: (1, 2, ...) or Roman: (I, II, ...)</param>
  3924. <param name="index">The text index to insert this PageCount place holder at.</param>
  3925. <example>
  3926. <code>
  3927. // Create a new document.
  3928. using (DocX document = DocX.Create(@"Test.docx"))
  3929. {
  3930. // Add Headers to the document.
  3931. document.AddHeaders();
  3932. // Get the default Header.
  3933. Header header = document.Headers.odd;
  3934. // Insert a Paragraph into the Header.
  3935. Paragraph p0 = header.InsertParagraph("Page ( of )");
  3936. // Insert place holders for PageNumber and PageCount into the Header.
  3937. // Word will replace these with the correct value for each Page.
  3938. p0.InsertPageNumber(PageNumberFormat.normal, 6);
  3939. p0.InsertPageCount(PageNumberFormat.normal, 11);
  3940. // Save the document.
  3941. document.Save();
  3942. }
  3943. </code>
  3944. </example>
  3945. <seealso cref="M:Novacode.Paragraph.AppendPageCount(Novacode.PageNumberFormat)"/>
  3946. <seealso cref="M:Novacode.Paragraph.AppendPageNumber(Novacode.PageNumberFormat)"/>
  3947. <seealso cref="M:Novacode.Paragraph.InsertPageNumber(Novacode.PageNumberFormat,System.Int32)"/>
  3948. </member>
  3949. <member name="M:Novacode.Paragraph.AppendPageCount(Novacode.PageNumberFormat)">
  3950. <summary>
  3951. Append a PageCount place holder onto the end of a Paragraph.
  3952. </summary>
  3953. <param name="pnf">The PageNumberFormat can be normal: (1, 2, ...) or Roman: (I, II, ...)</param>
  3954. <example>
  3955. <code>
  3956. // Create a new document.
  3957. using (DocX document = DocX.Create(@"Test.docx"))
  3958. {
  3959. // Add Headers to the document.
  3960. document.AddHeaders();
  3961. // Get the default Header.
  3962. Header header = document.Headers.odd;
  3963. // Insert a Paragraph into the Header.
  3964. Paragraph p0 = header.InsertParagraph();
  3965. // Appemd place holders for PageNumber and PageCount into the Header.
  3966. // Word will replace these with the correct value for each Page.
  3967. p0.Append("Page (");
  3968. p0.AppendPageNumber(PageNumberFormat.normal);
  3969. p0.Append(" of ");
  3970. p0.AppendPageCount(PageNumberFormat.normal);
  3971. p0.Append(")");
  3972. // Save the document.
  3973. document.Save();
  3974. }
  3975. </code>
  3976. </example>
  3977. <seealso cref="M:Novacode.Paragraph.AppendPageNumber(Novacode.PageNumberFormat)"/>
  3978. <seealso cref="M:Novacode.Paragraph.InsertPageNumber(Novacode.PageNumberFormat,System.Int32)"/>
  3979. <seealso cref="M:Novacode.Paragraph.InsertPageCount(Novacode.PageNumberFormat,System.Int32)"/>
  3980. </member>
  3981. <member name="P:Novacode.Run.StartIndex">
  3982. <summary>
  3983. Gets the start index of this Text (text length before this text)
  3984. </summary>
  3985. </member>
  3986. <member name="P:Novacode.Run.EndIndex">
  3987. <summary>
  3988. Gets the end index of this Text (text length before this text + this texts length)
  3989. </summary>
  3990. </member>
  3991. <member name="P:Novacode.Run.Value">
  3992. <summary>
  3993. The text value of this text element
  3994. </summary>
  3995. </member>
  3996. <member name="P:Novacode.Text.StartIndex">
  3997. <summary>
  3998. Gets the start index of this Text (text length before this text)
  3999. </summary>
  4000. </member>
  4001. <member name="P:Novacode.Text.EndIndex">
  4002. <summary>
  4003. Gets the end index of this Text (text length before this text + this texts length)
  4004. </summary>
  4005. </member>
  4006. <member name="P:Novacode.Text.Value">
  4007. <summary>
  4008. The text value of this text element
  4009. </summary>
  4010. </member>
  4011. <member name="M:Novacode.Text.PreserveSpace(System.Xml.Linq.XElement)">
  4012. <summary>
  4013. If a text element or delText element, starts or ends with a space,
  4014. it must have the attribute space, otherwise it must not have it.
  4015. </summary>
  4016. <param name="e">The (t or delText) element check</param>
  4017. </member>
  4018. <member name="T:Novacode.DocX">
  4019. <summary>
  4020. Represents a document.
  4021. </summary>
  4022. </member>
  4023. <member name="P:Novacode.DocX.MarginTop">
  4024. <summary>
  4025. Top margin value in points. 1pt = 1/72 of an inch. Word internally writes docx using units = 1/20th of a point.
  4026. </summary>
  4027. </member>
  4028. <member name="P:Novacode.DocX.MarginBottom">
  4029. <summary>
  4030. Bottom margin value in points. 1pt = 1/72 of an inch. Word internally writes docx using units = 1/20th of a point.
  4031. </summary>
  4032. </member>
  4033. <member name="P:Novacode.DocX.MarginLeft">
  4034. <summary>
  4035. Left margin value in points. 1pt = 1/72 of an inch. Word internally writes docx using units = 1/20th of a point.
  4036. </summary>
  4037. </member>
  4038. <member name="P:Novacode.DocX.MarginRight">
  4039. <summary>
  4040. Right margin value in points. 1pt = 1/72 of an inch. Word internally writes docx using units = 1/20th of a point.
  4041. </summary>
  4042. </member>
  4043. <member name="P:Novacode.DocX.MarginHeader">
  4044. <summary>
  4045. Header margin value in points. 1pt = 1/72 of an inch. Word internally writes docx using units = 1/20th of a point.
  4046. </summary>
  4047. </member>
  4048. <member name="P:Novacode.DocX.MarginFooter">
  4049. <summary>
  4050. Footer margin value in points. 1pt = 1/72 of an inch. Word internally writes docx using units = 1/20th of a point.
  4051. </summary>
  4052. </member>
  4053. <member name="M:Novacode.DocX.getMirrorMargins(System.Xml.Linq.XName)">
  4054. <summary>
  4055. Mirror Margins boolean value. True when margins has to be mirrored.
  4056. </summary>
  4057. </member>
  4058. <member name="P:Novacode.DocX.PageWidth">
  4059. <summary>
  4060. Page width value in points. 1pt = 1/72 of an inch. Word internally writes docx using units = 1/20th of a point.
  4061. </summary>
  4062. </member>
  4063. <member name="P:Novacode.DocX.PageHeight">
  4064. <summary>
  4065. Page height value in points. 1pt = 1/72 of an inch. Word internally writes docx using units = 1/20th of a point.
  4066. </summary>
  4067. </member>
  4068. <member name="P:Novacode.DocX.isProtected">
  4069. <summary>
  4070. Returns true if any editing restrictions are imposed on this document.
  4071. </summary>
  4072. <example>
  4073. <code>
  4074. // Create a new document.
  4075. using (DocX document = DocX.Create(@"Test.docx"))
  4076. {
  4077. if(document.isProtected)
  4078. Console.WriteLine("Protected");
  4079. else
  4080. Console.WriteLine("Not protected");
  4081. // Save the document.
  4082. document.Save();
  4083. }
  4084. </code>
  4085. </example>
  4086. <seealso cref="M:Novacode.DocX.AddProtection(Novacode.EditRestrictions)"/>
  4087. <seealso cref="M:Novacode.DocX.RemoveProtection"/>
  4088. <seealso cref="M:Novacode.DocX.GetProtectionType"/>
  4089. </member>
  4090. <member name="M:Novacode.DocX.GetProtectionType">
  4091. <summary>
  4092. Returns the type of editing protection imposed on this document.
  4093. </summary>
  4094. <returns>The type of editing protection imposed on this document.</returns>
  4095. <example>
  4096. <code>
  4097. Create a new document.
  4098. using (DocX document = DocX.Create(@"Test.docx"))
  4099. {
  4100. // Make sure the document is protected before checking the protection type.
  4101. if (document.isProtected)
  4102. {
  4103. EditRestrictions protection = document.GetProtectionType();
  4104. Console.WriteLine("Document is protected using " + protection.ToString());
  4105. }
  4106. else
  4107. Console.WriteLine("Document is not protected.");
  4108. // Save the document.
  4109. document.Save();
  4110. }
  4111. </code>
  4112. </example>
  4113. <seealso cref="M:Novacode.DocX.AddProtection(Novacode.EditRestrictions)"/>
  4114. <seealso cref="M:Novacode.DocX.RemoveProtection"/>
  4115. <seealso cref="P:Novacode.DocX.isProtected"/>
  4116. </member>
  4117. <member name="M:Novacode.DocX.AddProtection(Novacode.EditRestrictions)">
  4118. <summary>
  4119. Add editing protection to this document.
  4120. </summary>
  4121. <param name="er">The type of protection to add to this document.</param>
  4122. <example>
  4123. <code>
  4124. // Create a new document.
  4125. using (DocX document = DocX.Create(@"Test.docx"))
  4126. {
  4127. // Allow no editing, only the adding of comment.
  4128. document.AddProtection(EditRestrictions.comments);
  4129. // Save the document.
  4130. document.Save();
  4131. }
  4132. </code>
  4133. </example>
  4134. <seealso cref="M:Novacode.DocX.RemoveProtection"/>
  4135. <seealso cref="M:Novacode.DocX.GetProtectionType"/>
  4136. <seealso cref="P:Novacode.DocX.isProtected"/>
  4137. </member>
  4138. <member name="M:Novacode.DocX.RemoveProtection">
  4139. <summary>
  4140. Remove editing protection from this document.
  4141. </summary>
  4142. <example>
  4143. <code>
  4144. // Create a new document.
  4145. using (DocX document = DocX.Create(@"Test.docx"))
  4146. {
  4147. // Remove any editing restrictions that are imposed on this document.
  4148. document.RemoveProtection();
  4149. // Save the document.
  4150. document.Save();
  4151. }
  4152. </code>
  4153. </example>
  4154. <seealso cref="M:Novacode.DocX.AddProtection(Novacode.EditRestrictions)"/>
  4155. <seealso cref="M:Novacode.DocX.GetProtectionType"/>
  4156. <seealso cref="P:Novacode.DocX.isProtected"/>
  4157. </member>
  4158. <member name="P:Novacode.DocX.Headers">
  4159. <summary>
  4160. Returns a collection of Headers in this Document.
  4161. A document typically contains three Headers.
  4162. A default one (odd), one for the first page and one for even pages.
  4163. </summary>
  4164. <example>
  4165. <code>
  4166. // Create a document.
  4167. using (DocX document = DocX.Create(@"Test.docx"))
  4168. {
  4169. // Add header support to this document.
  4170. document.AddHeaders();
  4171. // Get a collection of all headers in this document.
  4172. Headers headers = document.Headers;
  4173. // The header used for the first page of this document.
  4174. Header first = headers.first;
  4175. // The header used for odd pages of this document.
  4176. Header odd = headers.odd;
  4177. // The header used for even pages of this document.
  4178. Header even = headers.even;
  4179. }
  4180. </code>
  4181. </example>
  4182. </member>
  4183. <member name="P:Novacode.DocX.Footers">
  4184. <summary>
  4185. Returns a collection of Footers in this Document.
  4186. A document typically contains three Footers.
  4187. A default one (odd), one for the first page and one for even pages.
  4188. </summary>
  4189. <example>
  4190. <code>
  4191. // Create a document.
  4192. using (DocX document = DocX.Create(@"Test.docx"))
  4193. {
  4194. // Add footer support to this document.
  4195. document.AddFooters();
  4196. // Get a collection of all footers in this document.
  4197. Footers footers = document.Footers;
  4198. // The footer used for the first page of this document.
  4199. Footer first = footers.first;
  4200. // The footer used for odd pages of this document.
  4201. Footer odd = footers.odd;
  4202. // The footer used for even pages of this document.
  4203. Footer even = footers.even;
  4204. }
  4205. </code>
  4206. </example>
  4207. </member>
  4208. <member name="P:Novacode.DocX.DifferentOddAndEvenPages">
  4209. <summary>
  4210. Should the Document use different Headers and Footers for odd and even pages?
  4211. </summary>
  4212. <example>
  4213. <code>
  4214. // Create a document.
  4215. using (DocX document = DocX.Create(@"Test.docx"))
  4216. {
  4217. // Add header support to this document.
  4218. document.AddHeaders();
  4219. // Get a collection of all headers in this document.
  4220. Headers headers = document.Headers;
  4221. // The header used for odd pages of this document.
  4222. Header odd = headers.odd;
  4223. // The header used for even pages of this document.
  4224. Header even = headers.even;
  4225. // Force the document to use a different header for odd and even pages.
  4226. document.DifferentOddAndEvenPages = true;
  4227. // Content can be added to the Headers in the same manor that it would be added to the main document.
  4228. Paragraph p1 = odd.InsertParagraph();
  4229. p1.Append("This is the odd pages header.");
  4230. Paragraph p2 = even.InsertParagraph();
  4231. p2.Append("This is the even pages header.");
  4232. // Save all changes to this document.
  4233. document.Save();
  4234. }// Release this document from memory.
  4235. </code>
  4236. </example>
  4237. </member>
  4238. <member name="P:Novacode.DocX.DifferentFirstPage">
  4239. <summary>
  4240. Should the Document use an independent Header and Footer for the first page?
  4241. </summary>
  4242. <example>
  4243. // Create a document.
  4244. using (DocX document = DocX.Create(@"Test.docx"))
  4245. {
  4246. // Add header support to this document.
  4247. document.AddHeaders();
  4248. // The header used for the first page of this document.
  4249. Header first = document.Headers.first;
  4250. // Force the document to use a different header for first page.
  4251. document.DifferentFirstPage = true;
  4252. // Content can be added to the Headers in the same manor that it would be added to the main document.
  4253. Paragraph p = first.InsertParagraph();
  4254. p.Append("This is the first pages header.");
  4255. // Save all changes to this document.
  4256. document.Save();
  4257. }// Release this document from memory.
  4258. </example>
  4259. </member>
  4260. <member name="P:Novacode.DocX.Images">
  4261. <summary>
  4262. Returns a list of Images in this document.
  4263. </summary>
  4264. <example>
  4265. Get the unique Id of every Image in this document.
  4266. <code>
  4267. // Load a document.
  4268. DocX document = DocX.Load(@"C:\Example\Test.docx");
  4269. // Loop through each Image in this document.
  4270. foreach (Novacode.Image i in document.Images)
  4271. {
  4272. // Get the unique Id which identifies this Image.
  4273. string uniqueId = i.Id;
  4274. }
  4275. </code>
  4276. </example>
  4277. <seealso cref="M:Novacode.DocX.AddImage(System.String,System.String)"/>
  4278. <seealso cref="M:Novacode.DocX.AddImage(System.IO.Stream,System.String)"/>
  4279. <seealso cref="P:Novacode.Paragraph.Pictures"/>
  4280. <seealso cref="M:Novacode.Paragraph.InsertPicture(Novacode.Picture,System.Int32)"/>
  4281. </member>
  4282. <member name="P:Novacode.DocX.CustomProperties">
  4283. <summary>
  4284. Returns a list of custom properties in this document.
  4285. </summary>
  4286. <example>
  4287. Method 1: Get the name, type and value of each CustomProperty in this document.
  4288. <code>
  4289. // Load Example.docx
  4290. DocX document = DocX.Load(@"C:\Example\Test.docx");
  4291. /*
  4292. * No two custom properties can have the same name,
  4293. * so a Dictionary is the perfect data structure to store them in.
  4294. * Each custom property can be accessed using its name.
  4295. */
  4296. foreach (string name in document.CustomProperties.Keys)
  4297. {
  4298. // Grab a custom property using its name.
  4299. CustomProperty cp = document.CustomProperties[name];
  4300. // Write this custom properties details to Console.
  4301. Console.WriteLine(string.Format("Name: '{0}', Value: {1}", cp.Name, cp.Value));
  4302. }
  4303. Console.WriteLine("Press any key...");
  4304. // Wait for the user to press a key before closing the Console.
  4305. Console.ReadKey();
  4306. </code>
  4307. </example>
  4308. <example>
  4309. Method 2: Get the name, type and value of each CustomProperty in this document.
  4310. <code>
  4311. // Load Example.docx
  4312. DocX document = DocX.Load(@"C:\Example\Test.docx");
  4313. /*
  4314. * No two custom properties can have the same name,
  4315. * so a Dictionary is the perfect data structure to store them in.
  4316. * The values of this Dictionary are CustomProperties.
  4317. */
  4318. foreach (CustomProperty cp in document.CustomProperties.Values)
  4319. {
  4320. // Write this custom properties details to Console.
  4321. Console.WriteLine(string.Format("Name: '{0}', Value: {1}", cp.Name, cp.Value));
  4322. }
  4323. Console.WriteLine("Press any key...");
  4324. // Wait for the user to press a key before closing the Console.
  4325. Console.ReadKey();
  4326. </code>
  4327. </example>
  4328. <seealso cref="M:Novacode.DocX.AddCustomProperty(Novacode.CustomProperty)"/>
  4329. </member>
  4330. <member name="P:Novacode.DocX.CoreProperties">
  4331. <summary>
  4332. Returns the list of document core properties with corresponding values.
  4333. </summary>
  4334. </member>
  4335. <member name="P:Novacode.DocX.Text">
  4336. <summary>
  4337. Get the Text of this document.
  4338. </summary>
  4339. <example>
  4340. Write to Console the Text from this document.
  4341. <code>
  4342. // Load a document
  4343. DocX document = DocX.Load(@"C:\Example\Test.docx");
  4344. // Get the text of this document.
  4345. string text = document.Text;
  4346. // Write the text of this document to Console.
  4347. Console.Write(text);
  4348. // Wait for the user to press a key before closing the console window.
  4349. Console.ReadKey();
  4350. </code>
  4351. </example>
  4352. </member>
  4353. <member name="P:Novacode.DocX.FootnotesText">
  4354. <summary>
  4355. Get the text of each footnote from this document
  4356. </summary>
  4357. </member>
  4358. <member name="P:Novacode.DocX.EndnotesText">
  4359. <summary>
  4360. Get the text of each endnote from this document
  4361. </summary>
  4362. </member>
  4363. <member name="M:Novacode.DocX.InsertDocument(Novacode.DocX,System.Boolean)">
  4364. <summary>
  4365. Insert the contents of another document at the end of this document.
  4366. </summary>
  4367. <param name="remote_document">The document to insert at the end of this document.</param>
  4368. <param name="append">If true, document is inserted at the end, otherwise document is inserted at the beginning.</param>
  4369. <example>
  4370. Create a new document and insert an old document into it.
  4371. <code>
  4372. // Create a new document.
  4373. using (DocX newDocument = DocX.Create(@"NewDocument.docx"))
  4374. {
  4375. // Load an old document.
  4376. using (DocX oldDocument = DocX.Load(@"OldDocument.docx"))
  4377. {
  4378. // Insert the old document into the new document.
  4379. newDocument.InsertDocument(oldDocument);
  4380. // Save the new document.
  4381. newDocument.Save();
  4382. }// Release the old document from memory.
  4383. }// Release the new document from memory.
  4384. </code>
  4385. <remarks>
  4386. If the document being inserted contains Images, CustomProperties and or custom styles, these will be correctly inserted into the new document. In the case of Images, new ID's are generated for the Images being inserted to avoid ID conflicts. CustomProperties with the same name will be ignored not replaced.
  4387. </remarks>
  4388. </example>
  4389. </member>
  4390. <member name="M:Novacode.DocX.InsertTable(System.Int32,System.Int32)">
  4391. <summary>
  4392. Insert a new Table at the end of this document.
  4393. </summary>
  4394. <param name="columnCount">The number of columns to create.</param>
  4395. <param name="rowCount">The number of rows to create.</param>
  4396. <returns>A new Table.</returns>
  4397. <example>
  4398. Insert a new Table with 2 columns and 3 rows, at the end of a document.
  4399. <code>
  4400. // Create a document.
  4401. using (DocX document = DocX.Create(@"C:\Example\Test.docx"))
  4402. {
  4403. // Create a new Table with 2 columns and 3 rows.
  4404. Table newTable = document.InsertTable(2, 3);
  4405. // Set the design of this Table.
  4406. newTable.Design = TableDesign.LightShadingAccent2;
  4407. // Set the column names.
  4408. newTable.Rows[0].Cells[0].Paragraph.InsertText("Ice Cream", false);
  4409. newTable.Rows[0].Cells[1].Paragraph.InsertText("Price", false);
  4410. // Fill row 1
  4411. newTable.Rows[1].Cells[0].Paragraph.InsertText("Chocolate", false);
  4412. newTable.Rows[1].Cells[1].Paragraph.InsertText("€3:50", false);
  4413. // Fill row 2
  4414. newTable.Rows[2].Cells[0].Paragraph.InsertText("Vanilla", false);
  4415. newTable.Rows[2].Cells[1].Paragraph.InsertText("€3:00", false);
  4416. // Save all changes made to document b.
  4417. document.Save();
  4418. }// Release this document from memory.
  4419. </code>
  4420. </example>
  4421. </member>
  4422. <member name="M:Novacode.DocX.AddList(System.String,System.Int32,Novacode.ListItemType,System.Nullable{System.Int32},System.Boolean,System.Boolean)">
  4423. <summary>
  4424. Create a new list with a list item.
  4425. </summary>
  4426. <param name="listText">The text of the first element in the created list.</param>
  4427. <param name="level">The indentation level of the element in the list.</param>
  4428. <param name="listType">The type of list to be created: Bulleted or Numbered.</param>
  4429. <param name="startNumber">The number start number for the list. </param>
  4430. <param name="trackChanges">Enable change tracking</param>
  4431. <param name="continueNumbering">Set to true if you want to continue numbering from the previous numbered list</param>
  4432. <returns>
  4433. The created List. Call AddListItem(...) to add more elements to the list.
  4434. Write the list to the Document with InsertList(...) once the list has all the desired
  4435. elements, otherwise the list will not be included in the working Document.
  4436. </returns>
  4437. </member>
  4438. <member name="M:Novacode.DocX.AddListItem(Novacode.List,System.String,System.Int32,Novacode.ListItemType,System.Nullable{System.Int32},System.Boolean,System.Boolean)">
  4439. <summary>
  4440. Add a list item to an already existing list.
  4441. </summary>
  4442. <param name="list">The list to add the new list item to.</param>
  4443. <param name="listText">The run text that should be in the new list item.</param>
  4444. <param name="level">The indentation level of the new list element.</param>
  4445. <param name="startNumber">The number start number for the list. </param>
  4446. <param name="trackChanges">Enable change tracking</param>
  4447. <param name="listType">Numbered or Bulleted list type. </param>
  4448. /// <param name="continueNumbering">Set to true if you want to continue numbering from the previous numbered list</param>
  4449. <returns>
  4450. The created List. Call AddListItem(...) to add more elements to the list.
  4451. Write the list to the Document with InsertList(...) once the list has all the desired
  4452. elements, otherwise the list will not be included in the working Document.
  4453. </returns>
  4454. </member>
  4455. <member name="M:Novacode.DocX.InsertList(Novacode.List)">
  4456. <summary>
  4457. Insert list into the document.
  4458. </summary>
  4459. <param name="list">The list to insert into the document.</param>
  4460. <returns>The list that was inserted into the document.</returns>
  4461. </member>
  4462. <member name="M:Novacode.DocX.InsertList(System.Int32,Novacode.List)">
  4463. <summary>
  4464. Insert a list at an index location in the document.
  4465. </summary>
  4466. <param name="index">Index in document to insert the list.</param>
  4467. <param name="list">The list that was inserted into the document.</param>
  4468. <returns></returns>
  4469. </member>
  4470. <member name="M:Novacode.DocX.InsertTable(System.Int32,Novacode.Table)">
  4471. <summary>
  4472. Insert a Table into this document. The Table's source can be a completely different document.
  4473. </summary>
  4474. <param name="t">The Table to insert.</param>
  4475. <param name="index">The index to insert this Table at.</param>
  4476. <returns>The Table now associated with this document.</returns>
  4477. <example>
  4478. Extract a Table from document a and insert it into document b, at index 10.
  4479. <code>
  4480. // Place holder for a Table.
  4481. Table t;
  4482. // Load document a.
  4483. using (DocX documentA = DocX.Load(@"C:\Example\a.docx"))
  4484. {
  4485. // Get the first Table from this document.
  4486. t = documentA.Tables[0];
  4487. }
  4488. // Load document b.
  4489. using (DocX documentB = DocX.Load(@"C:\Example\b.docx"))
  4490. {
  4491. /*
  4492. * Insert the Table that was extracted from document a, into document b.
  4493. * This creates a new Table that is now associated with document b.
  4494. */
  4495. Table newTable = documentB.InsertTable(10, t);
  4496. // Save all changes made to document b.
  4497. documentB.Save();
  4498. }// Release this document from memory.
  4499. </code>
  4500. </example>
  4501. </member>
  4502. <member name="M:Novacode.DocX.InsertTable(Novacode.Table)">
  4503. <summary>
  4504. Insert a Table into this document. The Table's source can be a completely different document.
  4505. </summary>
  4506. <param name="t">The Table to insert.</param>
  4507. <returns>The Table now associated with this document.</returns>
  4508. <example>
  4509. Extract a Table from document a and insert it at the end of document b.
  4510. <code>
  4511. // Place holder for a Table.
  4512. Table t;
  4513. // Load document a.
  4514. using (DocX documentA = DocX.Load(@"C:\Example\a.docx"))
  4515. {
  4516. // Get the first Table from this document.
  4517. t = documentA.Tables[0];
  4518. }
  4519. // Load document b.
  4520. using (DocX documentB = DocX.Load(@"C:\Example\b.docx"))
  4521. {
  4522. /*
  4523. * Insert the Table that was extracted from document a, into document b.
  4524. * This creates a new Table that is now associated with document b.
  4525. */
  4526. Table newTable = documentB.InsertTable(t);
  4527. // Save all changes made to document b.
  4528. documentB.Save();
  4529. }// Release this document from memory.
  4530. </code>
  4531. </example>
  4532. </member>
  4533. <member name="M:Novacode.DocX.InsertTable(System.Int32,System.Int32,System.Int32)">
  4534. <summary>
  4535. Insert a new Table at the end of this document.
  4536. </summary>
  4537. <param name="columnCount">The number of columns to create.</param>
  4538. <param name="rowCount">The number of rows to create.</param>
  4539. <param name="index">The index to insert this Table at.</param>
  4540. <returns>A new Table.</returns>
  4541. <example>
  4542. Insert a new Table with 2 columns and 3 rows, at index 37 in this document.
  4543. <code>
  4544. // Create a document.
  4545. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  4546. {
  4547. // Create a new Table with 3 rows and 2 columns. Insert this Table at index 37.
  4548. Table newTable = document.InsertTable(37, 3, 2);
  4549. // Set the design of this Table.
  4550. newTable.Design = TableDesign.LightShadingAccent3;
  4551. // Set the column names.
  4552. newTable.Rows[0].Cells[0].Paragraph.InsertText("Ice Cream", false);
  4553. newTable.Rows[0].Cells[1].Paragraph.InsertText("Price", false);
  4554. // Fill row 1
  4555. newTable.Rows[1].Cells[0].Paragraph.InsertText("Chocolate", false);
  4556. newTable.Rows[1].Cells[1].Paragraph.InsertText("€3:50", false);
  4557. // Fill row 2
  4558. newTable.Rows[2].Cells[0].Paragraph.InsertText("Vanilla", false);
  4559. newTable.Rows[2].Cells[1].Paragraph.InsertText("€3:00", false);
  4560. // Save all changes made to document b.
  4561. document.Save();
  4562. }// Release this document from memory.
  4563. </code>
  4564. </example>
  4565. </member>
  4566. <member name="M:Novacode.DocX.Create(System.IO.Stream,Novacode.DocumentTypes)">
  4567. <summary>
  4568. Creates a document using a Stream.
  4569. </summary>
  4570. <param name="stream">The Stream to create the document from.</param>
  4571. <param name="documentType"></param>
  4572. <returns>Returns a DocX object which represents the document.</returns>
  4573. <example>
  4574. Creating a document from a FileStream.
  4575. <code>
  4576. // Use a FileStream fs to create a new document.
  4577. using(FileStream fs = new FileStream(@"C:\Example\Test.docx", FileMode.Create))
  4578. {
  4579. // Load the document using fs
  4580. using (DocX document = DocX.Create(fs))
  4581. {
  4582. // Do something with the document here.
  4583. // Save all changes made to this document.
  4584. document.Save();
  4585. }// Release this document from memory.
  4586. }
  4587. </code>
  4588. </example>
  4589. <example>
  4590. Creating a document in a SharePoint site.
  4591. <code>
  4592. using(SPSite mySite = new SPSite("http://server/sites/site"))
  4593. {
  4594. // Open a connection to the SharePoint site
  4595. using(SPWeb myWeb = mySite.OpenWeb())
  4596. {
  4597. // Create a MemoryStream ms.
  4598. using (MemoryStream ms = new MemoryStream())
  4599. {
  4600. // Create a document using ms.
  4601. using (DocX document = DocX.Create(ms))
  4602. {
  4603. // Do something with the document here.
  4604. // Save all changes made to this document.
  4605. document.Save();
  4606. }// Release this document from memory
  4607. // Add the document to the SharePoint site
  4608. web.Files.Add("filename", ms.ToArray(), true);
  4609. }
  4610. }
  4611. }
  4612. </code>
  4613. </example>
  4614. <seealso cref="M:Novacode.DocX.Load(System.IO.Stream)"/>
  4615. <seealso cref="M:Novacode.DocX.Load(System.String)"/>
  4616. <seealso cref="M:Novacode.DocX.Save"/>
  4617. </member>
  4618. <member name="M:Novacode.DocX.Create(System.String,Novacode.DocumentTypes)">
  4619. <summary>
  4620. Creates a document using a fully qualified or relative filename.
  4621. </summary>
  4622. <param name="filename">The fully qualified or relative filename.</param>
  4623. <param name="documentType"></param>
  4624. <returns>Returns a DocX object which represents the document.</returns>
  4625. <example>
  4626. <code>
  4627. // Create a document using a relative filename.
  4628. using (DocX document = DocX.Create(@"..\Test.docx"))
  4629. {
  4630. // Do something with the document here.
  4631. // Save all changes made to this document.
  4632. document.Save();
  4633. }// Release this document from memory
  4634. </code>
  4635. <code>
  4636. // Create a document using a relative filename.
  4637. using (DocX document = DocX.Create(@"..\Test.docx"))
  4638. {
  4639. // Do something with the document here.
  4640. // Save all changes made to this document.
  4641. document.Save();
  4642. }// Release this document from memory
  4643. </code>
  4644. <seealso cref="M:Novacode.DocX.Load(System.IO.Stream)"/>
  4645. <seealso cref="M:Novacode.DocX.Load(System.String)"/>
  4646. <seealso cref="M:Novacode.DocX.Save"/>
  4647. </example>
  4648. </member>
  4649. <member name="M:Novacode.DocX.Copy">
  4650. <summary>
  4651. Saves and copies the document into a new DocX object
  4652. </summary>
  4653. <returns>
  4654. Returns a new DocX object with an identical document
  4655. </returns>
  4656. <example>
  4657. <seealso cref="M:Novacode.DocX.Load(System.IO.Stream)"/>
  4658. <seealso cref="M:Novacode.DocX.Save"/>
  4659. </example>
  4660. </member>
  4661. <member name="M:Novacode.DocX.Load(System.IO.Stream)">
  4662. <summary>
  4663. Loads a document into a DocX object using a Stream.
  4664. </summary>
  4665. <param name="stream">The Stream to load the document from.</param>
  4666. <returns>
  4667. Returns a DocX object which represents the document.
  4668. </returns>
  4669. <example>
  4670. Loading a document from a FileStream.
  4671. <code>
  4672. // Open a FileStream fs to a document.
  4673. using (FileStream fs = new FileStream(@"C:\Example\Test.docx", FileMode.Open))
  4674. {
  4675. // Load the document using fs.
  4676. using (DocX document = DocX.Load(fs))
  4677. {
  4678. // Do something with the document here.
  4679. // Save all changes made to the document.
  4680. document.Save();
  4681. }// Release this document from memory.
  4682. }
  4683. </code>
  4684. </example>
  4685. <example>
  4686. Loading a document from a SharePoint site.
  4687. <code>
  4688. // Get the SharePoint site that you want to access.
  4689. using (SPSite mySite = new SPSite("http://server/sites/site"))
  4690. {
  4691. // Open a connection to the SharePoint site
  4692. using (SPWeb myWeb = mySite.OpenWeb())
  4693. {
  4694. // Grab a document stored on this site.
  4695. SPFile file = web.GetFile("Source_Folder_Name/Source_File");
  4696. // DocX.Load requires a Stream, so open a Stream to this document.
  4697. Stream str = new MemoryStream(file.OpenBinary());
  4698. // Load the file using the Stream str.
  4699. using (DocX document = DocX.Load(str))
  4700. {
  4701. // Do something with the document here.
  4702. // Save all changes made to the document.
  4703. document.Save();
  4704. }// Release this document from memory.
  4705. }
  4706. }
  4707. </code>
  4708. </example>
  4709. <seealso cref="M:Novacode.DocX.Load(System.String)"/>
  4710. <seealso cref="M:Novacode.DocX.Save"/>
  4711. </member>
  4712. <member name="M:Novacode.DocX.Load(System.String)">
  4713. <summary>
  4714. Loads a document into a DocX object using a fully qualified or relative filename.
  4715. </summary>
  4716. <param name="filename">The fully qualified or relative filename.</param>
  4717. <returns>
  4718. Returns a DocX object which represents the document.
  4719. </returns>
  4720. <example>
  4721. <code>
  4722. // Load a document using its fully qualified filename
  4723. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  4724. {
  4725. // Do something with the document here
  4726. // Save all changes made to document.
  4727. document.Save();
  4728. }// Release this document from memory.
  4729. </code>
  4730. <code>
  4731. // Load a document using its relative filename.
  4732. using(DocX document = DocX.Load(@"..\..\Test.docx"))
  4733. {
  4734. // Do something with the document here.
  4735. // Save all changes made to document.
  4736. document.Save();
  4737. }// Release this document from memory.
  4738. </code>
  4739. <seealso cref="M:Novacode.DocX.Load(System.IO.Stream)"/>
  4740. <seealso cref="M:Novacode.DocX.Save"/>
  4741. </example>
  4742. </member>
  4743. <member name="M:Novacode.DocX.ApplyTemplate(System.String)">
  4744. <summary>
  4745. Applies document template to the document. Document template may include styles, headers, footers, properties, etc. as well as text content.
  4746. </summary>
  4747. <param name="templateFilePath">The path to the document template file.</param>
  4748. <exception cref="T:System.IO.FileNotFoundException">The document template file not found.</exception>
  4749. </member>
  4750. <member name="M:Novacode.DocX.ApplyTemplate(System.String,System.Boolean)">
  4751. <summary>
  4752. Applies document template to the document. Document template may include styles, headers, footers, properties, etc. as well as text content.
  4753. </summary>
  4754. <param name="templateFilePath">The path to the document template file.</param>
  4755. <param name="includeContent">Whether to copy the document template text content to document.</param>
  4756. <exception cref="T:System.IO.FileNotFoundException">The document template file not found.</exception>
  4757. </member>
  4758. <member name="M:Novacode.DocX.ApplyTemplate(System.IO.Stream)">
  4759. <summary>
  4760. Applies document template to the document. Document template may include styles, headers, footers, properties, etc. as well as text content.
  4761. </summary>
  4762. <param name="templateStream">The stream of the document template file.</param>
  4763. </member>
  4764. <member name="M:Novacode.DocX.ApplyTemplate(System.IO.Stream,System.Boolean)">
  4765. <summary>
  4766. Applies document template to the document. Document template may include styles, headers, footers, properties, etc. as well as text content.
  4767. </summary>
  4768. <param name="templateStream">The stream of the document template file.</param>
  4769. <param name="includeContent">Whether to copy the document template text content to document.</param>
  4770. </member>
  4771. <member name="M:Novacode.DocX.AddImage(System.String,System.String)">
  4772. <summary>
  4773. Add an Image into this document from a fully qualified or relative filename.
  4774. </summary>
  4775. <param name="filename">The fully qualified or relative filename.</param>
  4776. <param name="contentType">MIME type of image, guessed if not given.</param>
  4777. <returns>An Image file.</returns>
  4778. <example>
  4779. Add an Image into this document from a fully qualified filename.
  4780. <code>
  4781. // Load a document.
  4782. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  4783. {
  4784. // Add an Image from a file.
  4785. document.AddImage(@"C:\Example\Image.png");
  4786. // Save all changes made to this document.
  4787. document.Save();
  4788. }// Release this document from memory.
  4789. </code>
  4790. </example>
  4791. <seealso cref="M:Novacode.DocX.AddImage(System.IO.Stream,System.String)"/>
  4792. <seealso cref="M:Novacode.Paragraph.InsertPicture(Novacode.Picture,System.Int32)"/>
  4793. </member>
  4794. <member name="M:Novacode.DocX.AddImage(System.IO.Stream,System.String)">
  4795. <summary>
  4796. Add an Image into this document from a Stream.
  4797. </summary>
  4798. <param name="stream">A Stream stream.</param>
  4799. <param name="contentType">MIME type of image.</param>
  4800. <returns>An Image file.</returns>
  4801. <example>
  4802. Add an Image into a document using a Stream.
  4803. <code>
  4804. // Open a FileStream fs to an Image.
  4805. using (FileStream fs = new FileStream(@"C:\Example\Image.jpg", FileMode.Open))
  4806. {
  4807. // Load a document.
  4808. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  4809. {
  4810. // Add an Image from a filestream fs.
  4811. document.AddImage(fs);
  4812. // Save all changes made to this document.
  4813. document.Save();
  4814. }// Release this document from memory.
  4815. }
  4816. </code>
  4817. </example>
  4818. <seealso cref="M:Novacode.DocX.AddImage(System.String,System.String)"/>
  4819. <seealso cref="M:Novacode.Paragraph.InsertPicture(Novacode.Picture,System.Int32)"/>
  4820. </member>
  4821. <member name="M:Novacode.DocX.AddHyperlink(System.String,System.Uri)">
  4822. <summary>
  4823. Adds a hyperlink to a document and creates a Paragraph which uses it.
  4824. </summary>
  4825. <param name="text">The text as displayed by the hyperlink.</param>
  4826. <param name="uri">The hyperlink itself.</param>
  4827. <returns>Returns a hyperlink that can be inserted into a Paragraph.</returns>
  4828. <example>
  4829. Adds a hyperlink to a document and creates a Paragraph which uses it.
  4830. <code>
  4831. // Create a document.
  4832. using (DocX document = DocX.Create(@"Test.docx"))
  4833. {
  4834. // Add a hyperlink to this document.
  4835. Hyperlink h = document.AddHyperlink("Google", new Uri("http://www.google.com"));
  4836. // Add a new Paragraph to this document.
  4837. Paragraph p = document.InsertParagraph();
  4838. p.Append("My favourite search engine is ");
  4839. p.AppendHyperlink(h);
  4840. p.Append(", I think it's great.");
  4841. // Save all changes made to this document.
  4842. document.Save();
  4843. }
  4844. </code>
  4845. </example>
  4846. </member>
  4847. <member name="M:Novacode.DocX.AddHeaders">
  4848. <summary>
  4849. Adds three new Headers to this document. One for the first page, one for odd pages and one for even pages.
  4850. </summary>
  4851. <example>
  4852. // Create a document.
  4853. using (DocX document = DocX.Create(@"Test.docx"))
  4854. {
  4855. // Add header support to this document.
  4856. document.AddHeaders();
  4857. // Get a collection of all headers in this document.
  4858. Headers headers = document.Headers;
  4859. // The header used for the first page of this document.
  4860. Header first = headers.first;
  4861. // The header used for odd pages of this document.
  4862. Header odd = headers.odd;
  4863. // The header used for even pages of this document.
  4864. Header even = headers.even;
  4865. // Force the document to use a different header for first, odd and even pages.
  4866. document.DifferentFirstPage = true;
  4867. document.DifferentOddAndEvenPages = true;
  4868. // Content can be added to the Headers in the same manor that it would be added to the main document.
  4869. Paragraph p = first.InsertParagraph();
  4870. p.Append("This is the first pages header.");
  4871. // Save all changes to this document.
  4872. document.Save();
  4873. }// Release this document from memory.
  4874. </example>
  4875. </member>
  4876. <member name="M:Novacode.DocX.AddFooters">
  4877. <summary>
  4878. Adds three new Footers to this document. One for the first page, one for odd pages and one for even pages.
  4879. </summary>
  4880. <example>
  4881. // Create a document.
  4882. using (DocX document = DocX.Create(@"Test.docx"))
  4883. {
  4884. // Add footer support to this document.
  4885. document.AddFooters();
  4886. // Get a collection of all footers in this document.
  4887. Footers footers = document.Footers;
  4888. // The footer used for the first page of this document.
  4889. Footer first = footers.first;
  4890. // The footer used for odd pages of this document.
  4891. Footer odd = footers.odd;
  4892. // The footer used for even pages of this document.
  4893. Footer even = footers.even;
  4894. // Force the document to use a different footer for first, odd and even pages.
  4895. document.DifferentFirstPage = true;
  4896. document.DifferentOddAndEvenPages = true;
  4897. // Content can be added to the Footers in the same manor that it would be added to the main document.
  4898. Paragraph p = first.InsertParagraph();
  4899. p.Append("This is the first pages footer.");
  4900. // Save all changes to this document.
  4901. document.Save();
  4902. }// Release this document from memory.
  4903. </example>
  4904. </member>
  4905. <member name="M:Novacode.DocX.AddHeadersOrFooters(System.Boolean)">
  4906. <summary>
  4907. Adds a Header to a document.
  4908. If the document already contains a Header it will be replaced.
  4909. </summary>
  4910. <returns>The Header that was added to the document.</returns>
  4911. </member>
  4912. <member name="M:Novacode.DocX.Save">
  4913. <summary>
  4914. Save this document back to the location it was loaded from.
  4915. </summary>
  4916. <example>
  4917. <code>
  4918. // Load a document.
  4919. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  4920. {
  4921. // Add an Image from a file.
  4922. document.AddImage(@"C:\Example\Image.jpg");
  4923. // Save all changes made to this document.
  4924. document.Save();
  4925. }// Release this document from memory.
  4926. </code>
  4927. </example>
  4928. <seealso cref="M:Novacode.DocX.SaveAs(System.String)"/>
  4929. <seealso cref="M:Novacode.DocX.Load(System.IO.Stream)"/>
  4930. <seealso cref="M:Novacode.DocX.Load(System.String)"/>
  4931. <!--
  4932. Bug found and fixed by krugs525 on August 12 2009.
  4933. Use TFS compare to see exact code change.
  4934. -->
  4935. </member>
  4936. <member name="M:Novacode.DocX.SaveAs(System.String)">
  4937. <summary>
  4938. Save this document to a file.
  4939. </summary>
  4940. <param name="filename">The filename to save this document as.</param>
  4941. <example>
  4942. Load a document from one file and save it to another.
  4943. <code>
  4944. // Load a document using its fully qualified filename.
  4945. DocX document = DocX.Load(@"C:\Example\Test1.docx");
  4946. // Insert a new Paragraph
  4947. document.InsertParagraph("Hello world!", false);
  4948. // Save the document to a new location.
  4949. document.SaveAs(@"C:\Example\Test2.docx");
  4950. </code>
  4951. </example>
  4952. <example>
  4953. Load a document from a Stream and save it to a file.
  4954. <code>
  4955. DocX document;
  4956. using (FileStream fs1 = new FileStream(@"C:\Example\Test1.docx", FileMode.Open))
  4957. {
  4958. // Load a document using a stream.
  4959. document = DocX.Load(fs1);
  4960. // Insert a new Paragraph
  4961. document.InsertParagraph("Hello world again!", false);
  4962. }
  4963. // Save the document to a new location.
  4964. document.SaveAs(@"C:\Example\Test2.docx");
  4965. </code>
  4966. </example>
  4967. <seealso cref="M:Novacode.DocX.Save"/>
  4968. <seealso cref="M:Novacode.DocX.Load(System.IO.Stream)"/>
  4969. <seealso cref="M:Novacode.DocX.Load(System.String)"/>
  4970. </member>
  4971. <member name="M:Novacode.DocX.SaveAs(System.IO.Stream)">
  4972. <summary>
  4973. Save this document to a Stream.
  4974. </summary>
  4975. <param name="stream">The Stream to save this document to.</param>
  4976. <example>
  4977. Load a document from a file and save it to a Stream.
  4978. <code>
  4979. // Place holder for a document.
  4980. DocX document;
  4981. using (FileStream fs1 = new FileStream(@"C:\Example\Test1.docx", FileMode.Open))
  4982. {
  4983. // Load a document using a stream.
  4984. document = DocX.Load(fs1);
  4985. // Insert a new Paragraph
  4986. document.InsertParagraph("Hello world again!", false);
  4987. }
  4988. using (FileStream fs2 = new FileStream(@"C:\Example\Test2.docx", FileMode.Create))
  4989. {
  4990. // Save the document to a different stream.
  4991. document.SaveAs(fs2);
  4992. }
  4993. // Release this document from memory.
  4994. document.Dispose();
  4995. </code>
  4996. </example>
  4997. <example>
  4998. Load a document from one Stream and save it to another.
  4999. <code>
  5000. DocX document;
  5001. using (FileStream fs1 = new FileStream(@"C:\Example\Test1.docx", FileMode.Open))
  5002. {
  5003. // Load a document using a stream.
  5004. document = DocX.Load(fs1);
  5005. // Insert a new Paragraph
  5006. document.InsertParagraph("Hello world again!", false);
  5007. }
  5008. using (FileStream fs2 = new FileStream(@"C:\Example\Test2.docx", FileMode.Create))
  5009. {
  5010. // Save the document to a different stream.
  5011. document.SaveAs(fs2);
  5012. }
  5013. </code>
  5014. </example>
  5015. <seealso cref="M:Novacode.DocX.Save"/>
  5016. <seealso cref="M:Novacode.DocX.Load(System.IO.Stream)"/>
  5017. <seealso cref="M:Novacode.DocX.Load(System.String)"/>
  5018. </member>
  5019. <member name="M:Novacode.DocX.AddCoreProperty(System.String,System.String)">
  5020. <summary>
  5021. Add a core property to this document. If a core property already exists with the same name it will be replaced. Core property names are case insensitive.
  5022. </summary>
  5023. <param name="propertyName">The property name.</param>
  5024. <param name="propertyValue">The property value.</param>
  5025. <example>
  5026. Add a core properties of each type to a document.
  5027. <code>
  5028. // Load Example.docx
  5029. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  5030. {
  5031. // If this document does not contain a core property called 'forename', create one.
  5032. if (!document.CoreProperties.ContainsKey("forename"))
  5033. {
  5034. // Create a new core property called 'forename' and set its value.
  5035. document.AddCoreProperty("forename", "Cathal");
  5036. }
  5037. // Get this documents core property called 'forename'.
  5038. string forenameValue = document.CoreProperties["forename"];
  5039. // Print all of the information about this core property to Console.
  5040. Console.WriteLine(string.Format("Name: '{0}', Value: '{1}'\nPress any key...", "forename", forenameValue));
  5041. // Save all changes made to this document.
  5042. document.Save();
  5043. } // Release this document from memory.
  5044. // Wait for the user to press a key before exiting.
  5045. Console.ReadKey();
  5046. </code>
  5047. </example>
  5048. <seealso cref="P:Novacode.DocX.CoreProperties"/>
  5049. <seealso cref="T:Novacode.CustomProperty"/>
  5050. <seealso cref="P:Novacode.DocX.CustomProperties"/>
  5051. </member>
  5052. <member name="M:Novacode.DocX.AddCustomProperty(Novacode.CustomProperty)">
  5053. <summary>
  5054. Add a custom property to this document. If a custom property already exists with the same name it will be replace. CustomProperty names are case insensitive.
  5055. </summary>
  5056. <param name="cp">The CustomProperty to add to this document.</param>
  5057. <example>
  5058. Add a custom properties of each type to a document.
  5059. <code>
  5060. // Load Example.docx
  5061. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  5062. {
  5063. // A CustomProperty called forename which stores a string.
  5064. CustomProperty forename;
  5065. // If this document does not contain a custom property called 'forename', create one.
  5066. if (!document.CustomProperties.ContainsKey("forename"))
  5067. {
  5068. // Create a new custom property called 'forename' and set its value.
  5069. document.AddCustomProperty(new CustomProperty("forename", "Cathal"));
  5070. }
  5071. // Get this documents custom property called 'forename'.
  5072. forename = document.CustomProperties["forename"];
  5073. // Print all of the information about this CustomProperty to Console.
  5074. Console.WriteLine(string.Format("Name: '{0}', Value: '{1}'\nPress any key...", forename.Name, forename.Value));
  5075. // Save all changes made to this document.
  5076. document.Save();
  5077. } // Release this document from memory.
  5078. // Wait for the user to press a key before exiting.
  5079. Console.ReadKey();
  5080. </code>
  5081. </example>
  5082. <seealso cref="T:Novacode.CustomProperty"/>
  5083. <seealso cref="P:Novacode.DocX.CustomProperties"/>
  5084. </member>
  5085. <member name="M:Novacode.DocX.UpdateCustomPropertyValue(Novacode.DocX,System.String,System.String)">
  5086. <summary>
  5087. Update the custom properties inside the document
  5088. </summary>
  5089. <param name="document">The DocX document</param>
  5090. <param name="customPropertyName">The property used inside the document</param>
  5091. <param name="customPropertyValue">The new value for the property</param>
  5092. <remarks>Different version of Word create different Document XML.</remarks>
  5093. </member>
  5094. <member name="M:Novacode.DocX.InsertEquation(System.String)">
  5095. <summary>
  5096. Create an equation and insert it in the new paragraph
  5097. </summary>
  5098. </member>
  5099. <member name="M:Novacode.DocX.InsertChart(Novacode.Chart)">
  5100. <summary>
  5101. Insert a chart in document
  5102. </summary>
  5103. </member>
  5104. <member name="M:Novacode.DocX.InsertChartAfterParagraph(Novacode.Chart,Novacode.Paragraph)">
  5105. <summary>
  5106. Insert a chart in document after paragraph
  5107. </summary>
  5108. </member>
  5109. <member name="M:Novacode.DocX.InsertDefaultTableOfContents">
  5110. <summary>
  5111. Inserts a default TOC into the current document.
  5112. Title: Table of contents
  5113. Swithces will be: TOC \h \o '1-3' \u \z
  5114. </summary>
  5115. <returns>The inserted TableOfContents</returns>
  5116. </member>
  5117. <member name="M:Novacode.DocX.InsertTableOfContents(System.String,Novacode.TableOfContentsSwitches,System.String,System.Int32,System.Nullable{System.Int32})">
  5118. <summary>
  5119. Inserts a TOC into the current document.
  5120. </summary>
  5121. <param name="title">The title of the TOC</param>
  5122. <param name="switches">Switches to be applied, see: http://officeopenxml.com/WPtableOfContents.php </param>
  5123. <param name="headerStyle">Lets you set the style name of the TOC header</param>
  5124. <param name="maxIncludeLevel">Lets you specify how many header levels should be included - default is 1-3</param>
  5125. <param name="rightTabPos">Lets you override the right tab position - this is not common</param>
  5126. <returns>The inserted TableOfContents</returns>
  5127. </member>
  5128. <member name="M:Novacode.DocX.InsertTableOfContents(Novacode.Paragraph,System.String,Novacode.TableOfContentsSwitches,System.String,System.Int32,System.Nullable{System.Int32})">
  5129. <summary>
  5130. Inserts at TOC into the current document before the provided <paramref name="reference"/>
  5131. </summary>
  5132. <param name="reference">The paragraph to use as reference</param>
  5133. <param name="title">The title of the TOC</param>
  5134. <param name="switches">Switches to be applied, see: http://officeopenxml.com/WPtableOfContents.php </param>
  5135. <param name="headerStyle">Lets you set the style name of the TOC header</param>
  5136. <param name="maxIncludeLevel">Lets you specify how many header levels should be included - default is 1-3</param>
  5137. <param name="rightTabPos">Lets you override the right tab position - this is not common</param>
  5138. <returns>The inserted TableOfContents</returns>
  5139. </member>
  5140. <member name="M:Novacode.DocX.GetNextFreeDocPrId">
  5141. <summary>
  5142. Finds next free id for bookmarkStart/docPr.
  5143. </summary>
  5144. </member>
  5145. <member name="M:Novacode.DocX.Dispose">
  5146. <summary>
  5147. Releases all resources used by this document.
  5148. </summary>
  5149. <example>
  5150. If you take advantage of the using keyword, Dispose() is automatically called for you.
  5151. <code>
  5152. // Load document.
  5153. using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
  5154. {
  5155. // The document is only in memory while in this scope.
  5156. }// Dispose() is automatically called at this point.
  5157. </code>
  5158. </example>
  5159. <example>
  5160. This example is equilivant to the one above example.
  5161. <code>
  5162. // Load document.
  5163. DocX document = DocX.Load(@"C:\Example\Test.docx");
  5164. // Do something with the document here.
  5165. // Dispose of the document.
  5166. document.Dispose();
  5167. </code>
  5168. </example>
  5169. </member>
  5170. <member name="M:Novacode.Extensions.SetMargin(Novacode.DocX,System.Single,System.Single,System.Single,System.Single)">
  5171. <summary>
  5172. Sets margin for all the pages in a Dox document in Inches. (Written by Shashwat Tripathi)
  5173. </summary>
  5174. <param name="document"></param>
  5175. <param name="top">Margin from the Top. Leave -1 for no change</param>
  5176. <param name="bottom">Margin from the Bottom. Leave -1 for no change</param>
  5177. <param name="right">Margin from the Right. Leave -1 for no change</param>
  5178. <param name="left">Margin from the Left. Leave -1 for no change</param>
  5179. </member>
  5180. </members>
  5181. </doc>