Computer Hardware Forum - TweakPC

Computer Hardware Forum - TweakPC (https://www.tweakpc.de/forum/)
-   Programmiersprachen (https://www.tweakpc.de/forum/programmiersprachen/)
-   -   Brauche Hilfe bei MS Office Makros in VB (https://www.tweakpc.de/forum/programmiersprachen/14523-brauche-hilfe-ms-office-makros-vb.html)

Dj Piet 18.03.2004 18:45

Brauche Hilfe bei MS Office Makros in VB
 
SO geht darum das ich mit

[b]Selection.Copy [/b]einen bestimmten Textabschnitt kopiere.

dieser soll dann in der [b]Speichern unter[/b] FileName Dialogbox eingefügt werden.

genau dafür benötige ich den passenden Code.

Hier mal das Original...

Sub Makro

Selection.MoveDown Unit:=wdLine, Count:=3
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Copy
ActiveDocument.SaveAs FileName:="[b][color=red] wie bekomme ich hir Selection.Paste hinein [/color][/b].doc", _
FileFormat:=wdFormatDocument, LockComments:=False, Password:="", _
AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, _
EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData _
:=False, SaveAsAOCELetter:=False
End Sub

BomberD 23.03.2004 09:27

ActiveDocument.SaveAs FileName:="<Pfad>" + selection.text +".doc", _

edit: du brauchst das nicht kopieren.

wenn du was ausgewählt hast ist es schon selectiert, dann liegts in selection.


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:45 Uhr.

Powered by vBulletin® Version 3.8.10 (Deutsch)
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.5.2 ©2010, Crawlability, Inc.