Thema Datum  Von Nutzer Rating
Antwort
Rot aus Excel ein Word-Macro starten, mit bezug auf Excel
12.12.2017 19:16:38 bg15
Solved
13.12.2017 09:33:26 Gast53540
NotSolved
13.12.2017 10:50:01 Gast81973
NotSolved

Ansicht des Beitrags:
Von:
bg15
Datum:
12.12.2017 19:16:38
Views:
1132
Rating: Antwort:
 Nein
Thema:
aus Excel ein Word-Macro starten, mit bezug auf Excel

 

Moin Moin, liebe Community,

 

ich habe bei excel ein Button einfegügt, mit welchem ich ganz gerne ein leeres Word-Doc öffne und dort ein Macro ausführe.

Bzw. ich habe bei word ein Macro aufgezeichnet und wollte das bei excel - für den Button - schlicht einfügen. Klappt nicht :/

Kann mir iwer weiterhelfen ?

 

oder hat wer eine Idee wo ich einen Ansatz finde?

 

schon einmal ganz vielen dank

Gruß

Ps.: der angefügte Befehl ist meine Word-Excel combo

 

 

 

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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
Sub Drucken_1()
 
Dim xlApp As Word.Application
Set xlApp = CreateObject("Word.Application")
    xlApp.Documents.Add
    xlApp.Visible = True
     
     
    Selection.TypeText Text:="DAFD GmbH"
    Selection.TypeParagraph
    Selection.TypeText Text:="Potsdamer Platz 2"
    Selection.TypeParagraph
    Selection.TypeBackspace
    Selection.TypeText Text:=", 10115 Berlin"
    Selection.TypeParagraph
    Selection.TypeText Text:="e-mail: office@dafd.com"
    Selection.TypeParagraph
    Selection.TypeText Text:="internet: https://www.dafd.com"
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=15
    Selection.TypeText Text:="    "
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.TypeText Text:=" "
    Selection.MoveUp Unit:=wdLine, Count:=3
    Selection.MoveRight Unit:=wdCharacter, Count:=2
    Selection.MoveLeft Unit:=wdCharacter, Count:=9, Extend:=wdExtend
    Selection.Font.Bold = wdToggle
    Selection.Font.Grow
    Selection.Font.Grow
    Selection.Font.Grow
    Selection.Font.Shrink
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=18
    Selection.MoveRight Unit:=wdCharacter, Count:=3
    Selection.MoveDown Unit:=wdLine, Count:=3, Extend:=wdExtend
    Selection.Font.Shrink
    Selection.Font.Shrink
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=2
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeParagraph
    ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=8, NumColumns:= _
        2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
        wdAutoFitFixed
    With Selection.Tables(1)
        If .Style <> "Tabellenraster" Then
            .Style = "Tabellenraster"
        End If
        .ApplyStyleHeadingRows = True
        .ApplyStyleLastRow = False
        .ApplyStyleFirstColumn = True
        .ApplyStyleLastColumn = False
        .ApplyStyleRowBands = True
        .ApplyStyleColumnBands = False
    End With
    Selection.InlineShapes.AddPicture Filename:= _
        "C:\Users\Denis\Documents\Bachelor_FH-Stralsund_Host\AKTUELL\Logistik-BG\Dennis_logo(1).png" _
        , LinkToFile:=False, SaveWithDocument:=True
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
    Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.TypeParagraph
    Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.MoveLeft Unit:=wdCharacter, Count:=2
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.TypeBackspace
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Cut
    Selection.MoveUp Unit:=wdLine, Count:=7
    Selection.TypeText Text:=" "
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=4
    Selection.MoveUp Unit:=wdLine, Count:=3
    Selection.MoveLeft Unit:=wdCharacter, Count:=15
    Selection.PasteAndFormat (wdPasteDefault)
    Selection.TypeParagraph
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
    Selection.MoveRight Unit:=wdCell
    Selection.TypeText Text:="Angebotsdatum:"
    Selection.TypeParagraph
    Application.Move Left:=512, Top:=0
    Selection.TypeText Text:="Gültigkeitsdatum:"
    Selection.TypeParagraph
    Selection.TypeText Text:="Kunden-Nr.:"
    Selection.TypeParagraph
    Selection.TypeText Text:="Bearbeiter:"
    Selection.TypeParagraph
    Selection.TypeText Text:="Telefon:"
    Selection.MoveUp Unit:=wdLine, Count:=5
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=8
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveRight Unit:=wdCell
    Selection.MoveLeft Unit:=wdCharacter, Count:=2
    Selection.MoveUp Unit:=wdLine, Count:=4
    Selection.MoveRight Unit:=wdCharacter, Count:=7
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=18
    Selection.MoveDown Unit:=wdLine, Count:=3
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveUp Unit:=wdLine, Count:=5
    Selection.MoveDown Unit:=wdLine, Count:=5, Extend:=wdExtend
    Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=8, Extend:=wdExtend
    Application.WindowState = wdWindowStateMaximize
    Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=14
    Application.Move Left:=512, Top:=0
    Selection.TypeText Text:="    "
    Application.WindowState = wdWindowStateMaximize
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "CREATEDATE  ", PreserveFormatting:=True
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "CREATEDATE  \@ ""dd.MM.yyyy"" ", PreserveFormatting:=True
    Application.Move Left:=512, Top:=0
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeText Text:="        0001"
    Selection.MoveLeft Unit:=wdCharacter, Count:=4
    Selection.TypeText Text:="      "
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=7
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.TypeText Text:="     D.Wachter"
    Selection.MoveLeft Unit:=wdCharacter, Count:=3
    Selection.MoveRight Unit:=wdCharacter, Count:=4
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeText Text:=" 0170/7317777"
    Selection.MoveLeft Unit:=wdCharacter, Count:=2
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.TypeBackspace
    Selection.MoveLeft Unit:=wdCharacter, Count:=12
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.TypeText Text:=" "
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveUp Unit:=wdLine, Count:=4
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeText Text:="       "
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeText Text:="         "
    Selection.TypeParagraph
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.MoveDown Unit:=wdLine, Count:=2
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.TypeText Text:="            "
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.TypeText Text:="Angebot-Nr.: "
    Application.WindowState = wdWindowStateMaximize
    Selection.TypeText Text:="2017 - 0001"
    Application.Move Left:=512, Top:=0
    Selection.MoveLeft Unit:=wdCharacter, Count:=31, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=10, Extend:=wdExtend
    Selection.MoveLeft Unit:=wdCharacter, Count:=3, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=24, Extend:=wdExtend
    Application.WindowState = wdWindowStateMaximize
    Selection.Font.Bold = wdToggle
    Application.Move Left:=512, Top:=0
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeText Text:="Sehr geehrte Damen und Herren,"
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=29, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=4, Extend:=wdExtend
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=25, Extend:=wdExtend
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Font.Grow
    Selection.Font.Grow
    Selection.Font.Grow
    Selection.Font.Shrink
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeParagraph
    Selection.TypeText Text:= _
        "gemäß Ihrer Anfrage unterbreiten wir Ihnen nachfolgendes Ang"
    Selection.TypeText Text:="ebot."
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeParagraph
    Selection.TypeText Text:="Buchung:"
    Selection.MoveRight Unit:=wdCell
    Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
    Selection.TypeParagraph
    Selection.TypeText Text:="Preis"
    Selection.MoveRight Unit:=wdCharacter, Count:=2
    Selection.MoveDown Unit:=wdLine, Count:=3
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=8, Extend:=wdExtend
    Application.WindowState = wdWindowStateMaximize
    Application.Move Left:=-99, Top:=132
    Selection.Borders(wdBorderTop).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderRight).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderVertical).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
    Application.Move Left:=-6, Top:=-6
    Application.Move Left:=-265, Top:=4
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveUp Unit:=wdLine, Count:=5
    Selection.MoveRight Unit:=wdWord, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=7
    Selection.MoveRight Unit:=wdCharacter, Count:=10, Extend:=wdExtend
    With Selection.Borders(wdBorderBottom)
        .LineStyle = Options.DefaultBorderLineStyle
        .LineWidth = Options.DefaultBorderLineWidth
        .Color = Options.DefaultBorderColor
    End With
    Selection.Shading.Texture = wdTextureNone
    Selection.Shading.ForegroundPatternColor = wdColorAutomatic
    Selection.Shading.BackgroundPatternColor = -671023309
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.Delete Unit:=wdCharacter, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=9
    Selection.EndKey Unit:=wdLine
    Selection.Delete Unit:=wdCharacter, Count:=1
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=2
    Selection.MoveRight Unit:=wdCharacter, Count:=5
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeText Text:="Netto"
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    With Selection.Borders(wdBorderBottom)
        .LineStyle = Options.DefaultBorderLineStyle
        .LineWidth = Options.DefaultBorderLineWidth
        .Color = Options.DefaultBorderColor
    End With
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    With Selection.Borders(wdBorderBottom)
        .LineStyle = Options.DefaultBorderLineStyle
        .LineWidth = Options.DefaultBorderLineWidth
        .Color = Options.DefaultBorderColor
    End With
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    With Selection.Borders(wdBorderBottom)
        .LineStyle = Options.DefaultBorderLineStyle
        .LineWidth = Options.DefaultBorderLineWidth
        .Color = Options.DefaultBorderColor
    End With
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    With Selection.Borders(wdBorderBottom)
        .LineStyle = Options.DefaultBorderLineStyle
        .LineWidth = Options.DefaultBorderLineWidth
        .Color = Options.DefaultBorderColor
    End With
    Application.Move Left:=512, Top:=0
    Application.WindowState = wdWindowStateMaximize
    Options.DefaultBorderColor = -570359809
    Options.DefaultBorderColor = -603946753
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.MoveDown Unit:=wdLine, Count:=3, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Application.Move Left:=-387, Top:=42
    Options.DefaultBorderColor = -603946753
    Options.DefaultBorderColor = -603946753
    Options.DefaultBorderColor = -603946753
    Options.DefaultBorderColor = -603946753
    Application.Move Left:=-6, Top:=-6
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=3
    Selection.MoveRight Unit:=wdCharacter, Count:=2
    Application.Move Left:=512, Top:=0
    Selection.TypeParagraph
    Selection.MoveRight Unit:=wdCharacter, Count:=2
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.TypeBackspace
    Selection.MoveRight Unit:=wdCharacter, Count:=2
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Borders(wdBorderTop).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderRight).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.TypeText Text:="Zwischensumme"
    Selection.TypeParagraph
    Selection.TypeText Text:="USt 20%"
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeText Text:="Gesamtbetrag:"
    Selection.MoveLeft Unit:=wdCharacter, Count:=2
    Selection.MoveRight Unit:=wdCharacter, Count:=3
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=13, Extend:=wdExtend
    Application.WindowState = wdWindowStateMaximize
    Selection.Font.Bold = wdToggle
    Application.Move Left:=512, Top:=0
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeParagraph
    Selection.TypeText Text:="Wir freuen uns über Ihre Buchungsanfrage "
    Selection.MoveLeft Unit:=wdCharacter, Count:=43
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.EndKey Unit:=wdLine
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.EndKey Unit:=wdLine
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeBackspace
    Selection.TypeText Text:= _
        "Vielen Dank für Ihre Buchungsanfrage, wir hoffen Sie sind no"
    Selection.TypeText Text:= _
        "ch immer mit Ihrer Zusammenstellung zufrieden. Sollte dies n"
    Selection.TypeText Text:= _
        "icht der Fall sein, stehen wir Ihnen zu jeder Zeit auch tele"
    Selection.TypeText Text:="fonisch zur verfügung. "
    Selection.MoveLeft Unit:=wdCharacter, Count:=10
    Selection.TypeBackspace
    Selection.TypeText Text:="V"
    Selection.MoveRight Unit:=wdCharacter, Count:=11
    Selection.TypeBackspace
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeText Text:= _
        "Wir freuen uns Sie alsbald bei uns an Bord begrüßen zu dürfe"
    Selection.TypeText Text:="n"
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeText Text:="mit hanseatischen Grüßen,"
    Selection.TypeParagraph
    Selection.TypeText Text:="Ihr DAFD-Team"
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.EndKey Unit:=wdLine
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=14, Extend:=wdExtend
    Application.WindowState = wdWindowStateMaximize
    With Selection.Borders(wdBorderTop)
        .LineStyle = Options.DefaultBorderLineStyle
        .LineWidth = Options.DefaultBorderLineWidth
        .Color = Options.DefaultBorderColor
    End With
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.TypeParagraph
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.Borders(wdBorderTop).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderRight).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
    Selection.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.Font.UnderlineColor = wdColorAutomatic
    Selection.Font.Underline = wdUnderlineSingle
    Selection.Font.UnderlineColor = wdColorAutomatic
    Selection.Font.Underline = wdUnderlineNone
    Selection.TypeText Text:="________________"
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.TypeParagraph
    Selection.MoveDown Unit:=wdLine, Count:=4
    Application.Move Left:=512, Top:=0
    Selection.TypeText Text:="Bankverbindung" & vbTab & "BIC" & vbTab & "IBAN" _
         & vbTab & "UID-Nr."
    Selection.MoveLeft Unit:=wdCharacter, Count:=8
    Selection.MoveRight Unit:=wdCharacter, Count:=2
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.TypeBackspace
    Selection.MoveLeft Unit:=wdCharacter, Count:=4
    Selection.TypeBackspace
    Selection.MoveLeft Unit:=wdCharacter, Count:=4
    Selection.Delete Unit:=wdCharacter, Count:=1
    ActiveWindow.ActivePane.HorizontalPercentScrolled = 4
    Selection.TypeText Text:="                       "
    Selection.MoveRight Unit:=wdCharacter, Count:=4
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.TypeText Text:="                                       "
    Selection.MoveRight Unit:=wdCharacter, Count:=6
    Selection.MoveLeft Unit:=wdCharacter, Count:=2
    Selection.TypeText Text:="                                "
    Selection.MoveRight Unit:=wdCharacter, Count:=7
    With Selection.Borders(wdBorderTop)
        .LineStyle = Options.DefaultBorderLineStyle
        .LineWidth = Options.DefaultBorderLineWidth
        .Color = Options.DefaultBorderColor
    End With
    Selection.TypeParagraph
    Selection.TypeText Text:= _
        "Meine Bank                               ABCDEF1234         "
    Selection.TypeText Text:="            AT9JH80786A785478"
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.TypeText Text:="         "
    Selection.MoveDown Unit:=wdLine, Count:=1
    ActiveWindow.ActivePane.HorizontalPercentScrolled = 25
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=7
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeText Text:="            ATU1111112222"
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=131, Extend:=wdExtend
    Application.WindowState = wdWindowStateMaximize
    Selection.Font.Bold = wdToggle
End Sub

 


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
Rot aus Excel ein Word-Macro starten, mit bezug auf Excel
12.12.2017 19:16:38 bg15
Solved
13.12.2017 09:33:26 Gast53540
NotSolved
13.12.2017 10:50:01 Gast81973
NotSolved