Collapse All Expand All Language Filter: Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: J# Code: JScript

EDKB12WS Reference
ModMain.Dokumentwerte_Uebertragen Method
See Also

Assembly: EDKB12WS (in EDKB12WS.exe)

# Syntax

Visual Basic
Private Shared Function Dokumentwerte_Uebertragen() As Boolean
C#
private static bool Dokumentwerte_Uebertragen()
C++
private: static bool Dokumentwerte_Uebertragen()
JScript
private static function Dokumentwerte_Uebertragen() : boolean;

# Source code

Visual Basic | Copy Code
Private Function Dokumentwerte_Uebertragen() As Boolean Dim i As Long Dim pos As Long Dim pos2 As Long Dim Fieldlen As Long Dim temp1 As String Dim temp2 As String If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Dokumentwerte_Uebertragen", clsDivFnkt.Enum_InfoTyp.Information) End If For i = 0 To Dokumentdaten.Rows.Count - 1 If Param.DebugMode Then Try temp1 = Dokumentdaten.Rows(i).Item("beginntextmarke") Catch ex As Exception temp1 = "" End Try Try temp2 = Dokumentdaten.Rows(i).Item("feldname") Catch ex As Exception temp2 = "" End Try DivFnkt.InsertJournale("EDKB12: Dokumentwerte_Uebertragen:" & temp1 & ":" & temp2, clsDivFnkt.Enum_InfoTyp.Information) End If 'Beginn-Textmarke If Dokumentdaten.Rows(i).Item("aktiv") = True Then If Dokumentdaten.Rows(i).Item("beginntextmarke") Is System.DBNull.Value Then Dokumentdaten.Rows(i).Item("beginntextmarke") = "" End If If Dokumentdaten.Rows(i).Item("endetextmarke") Is System.DBNull.Value Then Dokumentdaten.Rows(i).Item("endetextmarke") = "" End If If Dokumentdaten.Rows(i).Item("feldname") Is System.DBNull.Value Then Dokumentdaten.Rows(i).Item("feldname") = "" End If If Dokumentdaten.Rows(i).Item("beginntextmarke") = "TGEDKCursor" Or _ Dokumentdaten.Rows(i).Item("beginntextmarke") = "TGEDKCursorB" Or _ Dokumentdaten.Rows(i).Item("feldname") = "TGEDKCursorB" Or _ Dokumentdaten.Rows(i).Item("feldname") = "TGEDKCursor" Then Else If Dokumentdaten.Rows(i).Item("beginntextmarke") <> "" And _ Dokumentdaten.Rows(i).Item("endetextmarke") = "" Then Try docword.Bookmarks.Item(Dokumentdaten.Rows(i).Item("beginntextmarke")).Select() pos = docword.Bookmarks.Item(Dokumentdaten.Rows(i).Item("beginntextmarke")).Start If Dokumentdaten.Rows(i).Item("used") = 1 Then objword.Selection.Text = Dokumentdaten.Rows(i).Item("xvalue") End If pos2 = objword.Selection.End If Microsoft.VisualBasic.Left(Dokumentdaten.Rows(i).Item("beginntextmarke"), 19) = "XTGEDKDirektTelefonB" Or _ Microsoft.VisualBasic.Left(Dokumentdaten.Rows(i).Item("beginntextmarke"), 23) = "XTGEDKVornameNameBetreue" Or _ Microsoft.VisualBasic.Left(Dokumentdaten.Rows(i).Item("beginntextmarke"), 19) = "XTGEDKDirektTelefonZ" Then objword.Selection.MoveLeft(Unit:=WdUnits.wdCharacter, Count:=1) 'hutter objword.Selection.TypeText(Text:=" ") objword.Selection.SetRange(Start:=pos + 1, End:=pos2 + 1) With docword.Bookmarks .Add(Range:=objword.Selection.Range, Name:=Dokumentdaten.Rows(i).Item("beginntextmarke")) .DefaultSorting = WdBookmarkSortBy.wdSortByName .ShowHidden = False End With Else If Microsoft.VisualBasic.Left(Dokumentdaten.Rows(i).Item("beginntextmarke"), 22) = "XTGEDKDirektTelefonDokZ" Or _ Microsoft.VisualBasic.Left(Dokumentdaten.Rows(i).Item("beginntextmarke"), 20) = "XTGEDKVornameNameDokZ" Then objword.Selection.Text = Dokumentdaten.Rows(i).Item("xvalue") objword.Selection.MoveLeft(Unit:=WdUnits.wdCharacter, Count:=1) objword.Selection.TypeText(Text:=" ") objword.Selection.SetRange(Start:=pos + 1, End:=pos2 + 1) With docword.Bookmarks .Add(Range:=objword.Selection.Range, Name:=Dokumentdaten.Rows(i).Item("beginntextmarke")) .DefaultSorting = WdBookmarkSortBy.wdSortByName .ShowHidden = False End With Else objword.Visible = True objword.Selection.SetRange(Start:=pos, End:=pos2) With docword.Bookmarks .Add(Range:=objword.Selection.Range, Name:=Dokumentdaten.Rows(i).Item("beginntextmarke")) .DefaultSorting = WdBookmarkSortBy.wdSortByName .ShowHidden = False End With End If End If objword.Selection.MoveLeft(Unit:=WdUnits.wdCharacter, Count:=1) objword.Selection.MoveLeft(Unit:=WdUnits.wdCharacter, Count:=2, Extend:=WdMovementType.wdExtend) If objword.Selection.Text = " " Then objword.Selection.MoveRight(Unit:=WdUnits.wdCharacter, Count:=1) objword.Selection.MoveLeft(Unit:=WdUnits.wdCharacter, Count:=1, Extend:=WdMovementType.wdExtend) objword.Selection.Delete(Unit:=WdUnits.wdCharacter, Count:=1) End If Catch End Try End If 'Beginn- und Ende-Textmarke If Dokumentdaten.Rows(i).Item("beginntextmarke") <> "" And _ Dokumentdaten.Rows(i).Item("endetextmarke") <> "" Then Try docword.Bookmarks.Item(Dokumentdaten.Rows(i).Item("beginntextmarke")).Select() pos = docword.Bookmarks.Item(Dokumentdaten.Rows(i).Item("beginntextmarke")).Start docword.Bookmarks.Item(Dokumentdaten.Rows(i).Item("endetextmarke")).Select() pos2 = docword.Bookmarks.Item(Dokumentdaten.Rows(i).Item("endetextmarke")).Start objword.Selection.SetRange(Start:=pos, End:=pos2) If Dokumentdaten.Rows(i).Item("used") = 1 Then objword.Selection.TypeText(Text:=Dokumentdaten.Rows(i).Item("xvalue")) End If With docword.Bookmarks .Add(Range:=objword.Selection.Range, Name:=Dokumentdaten.Rows(i).Item("beginntextmarke")) .DefaultSorting = WdBookmarkSortBy.wdSortByName .ShowHidden = False End With Catch End Try End If 'Felder If Dokumentdaten.Rows(i).Item("feldname") <> "" Then Try If docword.FormFields.Item(Dokumentdaten.Rows(i).Item("feldname")).TextInput.Width <> 0 Then Fieldlen = docword.FormFields.Item(Dokumentdaten.Rows(i).Item("feldname")).TextInput.Width docword.FormFields.Item(Dokumentdaten.Rows(i).Item("feldname")).TextInput.Width = Fieldlen + 5 End If If Dokumentdaten.Rows(i).Item("used") = 1 Then docword.FormFields.Item(Dokumentdaten.Rows(i).Item("feldname")).Result = convert_wordfelder(Dokumentdaten.Rows(i).Item("xvalue")) End If Catch End Try End If End If End If Next If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Ende Dokumentwerte_Uebertragen", clsDivFnkt.Enum_InfoTyp.Information) End If Return True End Function

# Platforms

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2 The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

# Version Information

## .NET Framework Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0 ## .NET Compact Framework Supported in: 3.5, 2.0, 1.0 ## XNA Framework Supported in: 3.0, 2.0, 1.0

# See Also

## Reference ModMain Class ModMain ModMain Members