Entwickler-Ecke
Sonstiges (Delphi) - Office mit Personal Edition steuern?
F 0 R C E - Fr 21.05.04 11:39
Titel: Office mit Personal Edition steuern?
Hallo Leute,
ich bin neu in diesem Forum und hätte da gleich mal ne Frage:
Kann es sein, das man die Packages, die man zum steuern von Office (2000 und XP) bei der Personal Edition von Delphi 7 nicht mitgeliefert bekommt? Ich kann sie jedenfalls nicht finden, und der Eintrag "Server" in der Komponentenleiste fehlt auch.
Kann mir da jemand weiterhelfen?
Schonmal vielen Dank im Vorraus,
mfG
F0RCE
MartinPb - Fr 21.05.04 12:59
Nicht in der Personaledition enthalten.
Gausi - Fr 21.05.04 15:23
Aber man kann trotzdem Word oder Excel fernsteuern.
Zum Einstieg was für Excel:
Ganz genau weiss ich das auch nicht mehr, war ne ziemliche Friemelarbeit, bis ich meinen DatenExport nach Excel und Word richtig hinbekam, aber mit den Anfängen solltest du klar kommen. Irgendwann läufts ;-)
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18:
| uses oleserver, comobj, types97; [...] var wbk,ws,xlapp: variant; flcid:integer; [..] try flcid:=GetUserDefaultLCID; if VarType(XlApp) <> VarDispatch then XlApp := CreateOleObject('Excel.Application'); except with application do Messagebox('Microsoft Excel konnte nicht gefunden werden.','Fehler',MB_OK); exit; end; wbk := XlApp.WorkBooks.Add(xlWBATWorksheet); ws := XlApp.WorkBooks[1].Sheets[1]; XlApp.Visible := True; [..] ws.Range['A1','A1'].Value2:='Ein toller Eintrag'; [..] |
die Unit types97 musst du selber erstellen. Kann man aus den Office-*.OLB gewinnen über
Project-Import Type Library-... [weiss nicht mehr genau, musst du n bissel experimentieren, hängt auch von der Office Version ab]. Oder du nimmst meine, die ich auch irgendwo her hab...Da steht zwar was von ner Excel8.olb, aber die finde ich bei meiner xp-installation nicht, gehörte wohl zu der 97er Version
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326: 327: 328: 329: 330: 331: 332: 333: 334: 335: 336: 337: 338: 339: 340: 341: 342: 343: 344: 345: 346: 347: 348: 349: 350: 351: 352: 353: 354: 355: 356: 357: 358: 359: 360: 361: 362: 363: 364: 365: 366: 367: 368: 369: 370:
| unit Types97;
interface
const xlWBATChart = $FFFFEFF3; xlWBATExcel4IntlMacroSheet = $00000004; xlWBATExcel4MacroSheet = $00000003; xlWBATWorksheet = $FFFFEFB9;
xlChart = $FFFFEFF3; xlDialogSheet = $FFFFEFEC; xlExcel4IntlMacroSheet = $00000004; xlExcel4MacroSheet = $00000003; xlWorksheet = $FFFFEFB9;
xlContinuous = $00000001; xlDash = $FFFFEFED; xlDashDot = $00000004; xlDashDotDot = $00000005; xlDot = $FFFFEFEA; xlDouble = $FFFFEFE9; xlSlantDashDot = $0000000D; xlLineStyleNone = $FFFFEFD2;
xlHairline = $00000001; xlMedium = $FFFFEFD6; xlThick = $00000004; xlThin = $00000002;
xlInsideHorizontal = $0000000C; xlInsideVertical = $0000000B; xlDiagonalDown = $00000005; xlDiagonalUp = $00000006; xlEdgeBottom = $00000009; xlEdgeLeft = $00000007; xlEdgeRight = $0000000A; xlEdgeTop = $00000008;
xlPatternAutomatic = $FFFFEFF7; xlPatternChecker = $00000009; xlPatternCrissCross = $00000010; xlPatternDown = $FFFFEFE7; xlPatternGray16 = $00000011; xlPatternGray25 = $FFFFEFE4; xlPatternGray50 = $FFFFEFE3; xlPatternGray75 = $FFFFEFE2; xlPatternGray8 = $00000012; xlPatternGrid = $0000000F; xlPatternHorizontal = $FFFFEFE0; xlPatternLightDown = $0000000D; xlPatternLightHorizontal = $0000000B; xlPatternLightUp = $0000000E; xlPatternLightVertical = $0000000C; xlPatternNone = $FFFFEFD2; xlPatternSemiGray75 = $0000000A; xlPatternSolid = $00000001; xlPatternUp = $FFFFEFBE; xlPatternVertical = $FFFFEFBA;
xlColumnClustered = $00000033; xlColumnStacked = $00000034; xlColumnStacked100 = $00000035; xl3DColumnClustered = $00000036; xl3DColumnStacked = $00000037; xl3DColumnStacked100 = $00000038; xlBarClustered = $00000039; xlBarStacked = $0000003A; xlBarStacked100 = $0000003B; xl3DBarClustered = $0000003C; xl3DBarStacked = $0000003D; xl3DBarStacked100 = $0000003E; xlLineStacked = $0000003F; xlLineStacked100 = $00000040; xlLineMarkers = $00000041; xlLineMarkersStacked = $00000042; xlLineMarkersStacked100 = $00000043; xlPieOfPie = $00000044; xlPieExploded = $00000045; xl3DPieExploded = $00000046; xlBarOfPie = $00000047; xlXYScatterSmooth = $00000048; xlXYScatterSmoothNoMarkers = $00000049; xlXYScatterLines = $0000004A; xlXYScatterLinesNoMarkers = $0000004B; xlAreaStacked = $0000004C; xlAreaStacked100 = $0000004D; xl3DAreaStacked = $0000004E; xl3DAreaStacked100 = $0000004F; xlDoughnutExploded = $00000050; xlRadarMarkers = $00000051; xlRadarFilled = $00000052; xlSurface = $00000053; xlSurfaceWireframe = $00000054; xlSurfaceTopView = $00000055; xlSurfaceTopViewWireframe = $00000056; xlBubble = $0000000F; xlBubble3DEffect = $00000057; xlStockHLC = $00000058; xlStockOHLC = $00000059; xlStockVHLC = $0000005A; xlStockVOHLC = $0000005B; xlCylinderColClustered = $0000005C; xlCylinderColStacked = $0000005D; xlCylinderColStacked100 = $0000005E; xlCylinderBarClustered = $0000005F; xlCylinderBarStacked = $00000060; xlCylinderBarStacked100 = $00000061; xlCylinderCol = $00000062; xlConeColClustered = $00000063; xlConeColStacked = $00000064; xlConeColStacked100 = $00000065; xlConeBarClustered = $00000066; xlConeBarStacked = $00000067; xlConeBarStacked100 = $00000068; xlConeCol = $00000069; xlPyramidColClustered = $0000006A; xlPyramidColStacked = $0000006B; xlPyramidColStacked100 = $0000006C; xlPyramidBarClustered = $0000006D; xlPyramidBarStacked = $0000006E; xlPyramidBarStacked100 = $0000006F; xlPyramidCol = $00000070; xl3DColumn = $FFFFEFFC; xlLine = $00000004; xl3DLine = $FFFFEFFB; xl3DPie = $FFFFEFFA; xlPie = $00000005; xlXYScatter = $FFFFEFB7; xl3DArea = $FFFFEFFE; xlArea = $00000001; xlDoughnut = $FFFFEFE8; xlRadar = $FFFFEFC9;
xlLeft = $FFFFEFDD; xlCenter = $FFFFEFF4; xlRight = $FFFFEFC8;
wdPasteOLEObject = $00000000; wdPasteRTF = $00000001; wdPasteText = $00000002; wdPasteMetafilePicture = $00000003; wdPasteBitmap = $00000004; wdPasteDeviceIndependentBitmap = $00000005; wdPasteHyperlink = $00000007; wdPasteShape = $00000008; wdPasteEnhancedMetafile = $00000009;
msoShapeMixed = $FFFFFFFE; msoShapeRectangle = $00000001; msoShapeParallelogram = $00000002; msoShapeTrapezoid = $00000003; msoShapeDiamond = $00000004; msoShapeRoundedRectangle = $00000005; msoShapeOctagon = $00000006; msoShapeIsoscelesTriangle = $00000007; msoShapeRightTriangle = $00000008; msoShapeOval = $00000009; msoShapeHexagon = $0000000A; msoShapeCross = $0000000B; msoShapeRegularPentagon = $0000000C; msoShapeCan = $0000000D; msoShapeCube = $0000000E; msoShapeBevel = $0000000F; msoShapeFoldedCorner = $00000010; msoShapeSmileyFace = $00000011; msoShapeDonut = $00000012; msoShapeNoSymbol = $00000013; msoShapeBlockArc = $00000014; msoShapeHeart = $00000015; msoShapeLightningBolt = $00000016; msoShapeSun = $00000017; msoShapeMoon = $00000018; msoShapeArc = $00000019; msoShapeDoubleBracket = $0000001A; msoShapeDoubleBrace = $0000001B; msoShapePlaque = $0000001C; msoShapeLeftBracket = $0000001D; msoShapeRightBracket = $0000001E; msoShapeLeftBrace = $0000001F; msoShapeRightBrace = $00000020; msoShapeRightArrow = $00000021; msoShapeLeftArrow = $00000022; msoShapeUpArrow = $00000023; msoShapeDownArrow = $00000024; msoShapeLeftRightArrow = $00000025; msoShapeUpDownArrow = $00000026; msoShapeQuadArrow = $00000027; msoShapeLeftRightUpArrow = $00000028; msoShapeBentArrow = $00000029; msoShapeUTurnArrow = $0000002A; msoShapeLeftUpArrow = $0000002B; msoShapeBentUpArrow = $0000002C; msoShapeCurvedRightArrow = $0000002D; msoShapeCurvedLeftArrow = $0000002E; msoShapeCurvedUpArrow = $0000002F; msoShapeCurvedDownArrow = $00000030; msoShapeStripedRightArrow = $00000031; msoShapeNotchedRightArrow = $00000032; msoShapePentagon = $00000033; msoShapeChevron = $00000034; msoShapeRightArrowCallout = $00000035; msoShapeLeftArrowCallout = $00000036; msoShapeUpArrowCallout = $00000037; msoShapeDownArrowCallout = $00000038; msoShapeLeftRightArrowCallout = $00000039; msoShapeUpDownArrowCallout = $0000003A; msoShapeQuadArrowCallout = $0000003B; msoShapeCircularArrow = $0000003C; msoShapeFlowchartProcess = $0000003D; msoShapeFlowchartAlternateProcess = $0000003E; msoShapeFlowchartDecision = $0000003F; msoShapeFlowchartData = $00000040; msoShapeFlowchartPredefinedProcess = $00000041; msoShapeFlowchartInternalStorage = $00000042; msoShapeFlowchartDocument = $00000043; msoShapeFlowchartMultidocument = $00000044; msoShapeFlowchartTerminator = $00000045; msoShapeFlowchartPreparation = $00000046; msoShapeFlowchartManualInput = $00000047; msoShapeFlowchartManualOperation = $00000048; msoShapeFlowchartConnector = $00000049; msoShapeFlowchartOffpageConnector = $0000004A; msoShapeFlowchartCard = $0000004B; msoShapeFlowchartPunchedTape = $0000004C; msoShapeFlowchartSummingJunction = $0000004D; msoShapeFlowchartOr = $0000004E; msoShapeFlowchartCollate = $0000004F; msoShapeFlowchartSort = $00000050; msoShapeFlowchartExtract = $00000051; msoShapeFlowchartMerge = $00000052; msoShapeFlowchartStoredData = $00000053; msoShapeFlowchartDelay = $00000054; msoShapeFlowchartSequentialAccessStorage = $00000055; msoShapeFlowchartMagneticDisk = $00000056; msoShapeFlowchartDirectAccessStorage = $00000057; msoShapeFlowchartDisplay = $00000058; msoShapeExplosion1 = $00000059; msoShapeExplosion2 = $0000005A; msoShape4pointStar = $0000005B; msoShape5pointStar = $0000005C; msoShape8pointStar = $0000005D; msoShape16pointStar = $0000005E; msoShape24pointStar = $0000005F; msoShape32pointStar = $00000060; msoShapeUpRibbon = $00000061; msoShapeDownRibbon = $00000062; msoShapeCurvedUpRibbon = $00000063; msoShapeCurvedDownRibbon = $00000064; msoShapeVerticalScroll = $00000065; msoShapeHorizontalScroll = $00000066; msoShapeWave = $00000067; msoShapeDoubleWave = $00000068; msoShapeRectangularCallout = $00000069; msoShapeRoundedRectangularCallout = $0000006A; msoShapeOvalCallout = $0000006B; msoShapeCloudCallout = $0000006C; msoShapeLineCallout1 = $0000006D; msoShapeLineCallout2 = $0000006E; msoShapeLineCallout3 = $0000006F; msoShapeLineCallout4 = $00000070; msoShapeLineCallout1AccentBar = $00000071; msoShapeLineCallout2AccentBar = $00000072; msoShapeLineCallout3AccentBar = $00000073; msoShapeLineCallout4AccentBar = $00000074; msoShapeLineCallout1NoBorder = $00000075; msoShapeLineCallout2NoBorder = $00000076; msoShapeLineCallout3NoBorder = $00000077; msoShapeLineCallout4NoBorder = $00000078; msoShapeLineCallout1BorderandAccentBar = $00000079; msoShapeLineCallout2BorderandAccentBar = $0000007A; msoShapeLineCallout3BorderandAccentBar = $0000007B; msoShapeLineCallout4BorderandAccentBar = $0000007C; msoShapeActionButtonCustom = $0000007D; msoShapeActionButtonHome = $0000007E; msoShapeActionButtonHelp = $0000007F; msoShapeActionButtonInformation = $00000080; msoShapeActionButtonBackorPrevious = $00000081; msoShapeActionButtonForwardorNext = $00000082; msoShapeActionButtonBeginning = $00000083; msoShapeActionButtonEnd = $00000084; msoShapeActionButtonReturn = $00000085; msoShapeActionButtonDocument = $00000086; msoShapeActionButtonSound = $00000087; msoShapeActionButtonMovie = $00000088; msoShapeBalloon = $00000089; msoShapeNotPrimitive = $0000008A;
msoTextEffectMixed = $FFFFFFFE; msoTextEffect1 = $00000000; msoTextEffect2 = $00000001; msoTextEffect3 = $00000002; msoTextEffect4 = $00000003; msoTextEffect5 = $00000004; msoTextEffect6 = $00000005; msoTextEffect7 = $00000006; msoTextEffect8 = $00000007; msoTextEffect9 = $00000008; msoTextEffect10 = $00000009; msoTextEffect11 = $0000000A; msoTextEffect12 = $0000000B; msoTextEffect13 = $0000000C; msoTextEffect14 = $0000000D; msoTextEffect15 = $0000000E; msoTextEffect16 = $0000000F; msoTextEffect17 = $00000010; msoTextEffect18 = $00000011; msoTextEffect19 = $00000012; msoTextEffect20 = $00000013; msoTextEffect21 = $00000014; msoTextEffect22 = $00000015; msoTextEffect23 = $00000016; msoTextEffect24 = $00000017; msoTextEffect25 = $00000018; msoTextEffect26 = $00000019; msoTextEffect27 = $0000001A; msoTextEffect28 = $0000001B; msoTextEffect29 = $0000001C; msoTextEffect30 = $0000001D;
msoGradientMixed = $FFFFFFFE; msoGradientHorizontal = $00000001; msoGradientVertical = $00000002; msoGradientDiagonalUp = $00000003; msoGradientDiagonalDown = $00000004; msoGradientFromCorner = $00000005; msoGradientFromTitle = $00000006; msoGradientFromCenter = $00000007;
msoPresetExtrusionDirectionMixed = $FFFFFFFE; msoExtrusionBottomRight = $00000001; msoExtrusionBottom = $00000002; msoExtrusionBottomLeft = $00000003; msoExtrusionRight = $00000004; msoExtrusionNone = $00000005; msoExtrusionLeft = $00000006; msoExtrusionTopRight = $00000007; msoExtrusionTop = $00000008; msoExtrusionTopLeft = $00000009;
implementation
end. |
Ansonsten hilft wahrscheinlich ein Blick hierrein weiter
http://homepages.borland.com/ccalvert/TechPapers/Delphi/DelphiWord.htm
http://www.djpate.freeserve.co.uk/AutoExcl.htm
http://www.msdn.microsoft.com/
F 0 R C E - Fr 21.05.04 15:30
Danke für die Antwort!
MfG
F0RCE
Entwickler-Ecke.de based on phpBB
Copyright 2002 - 2011 by Tino Teuber, Copyright 2011 - 2025 by Christian Stelzmann Alle Rechte vorbehalten.
Alle Beiträge stammen von dritten Personen und dürfen geltendes Recht nicht verletzen.
Entwickler-Ecke und die zugehörigen Webseiten distanzieren sich ausdrücklich von Fremdinhalten jeglicher Art!