Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

convert to OLE..

Former Member
0 Likes
417

Hello guys...

i need ur experties about this.

can anyone out here help me in translating this vb code for OLE? thanks a lot in advance.

-Mark-

Documents.Add DocumentType:=wdNewBlankDocument

ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _

3, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _

wdAutoFitFixed

With Selection.Tables(1)

If .Style <> "Table Grid" Then

.Style = "Table Grid"

End If

.ApplyStyleHeadingRows = True

.ApplyStyleLastRow = True

.ApplyStyleFirstColumn = True

.ApplyStyleLastColumn = True

End With

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveUp Unit:=wdLine, Count:=2

Selection.TypeText Text:="personal data"

Selection.MoveDown Unit:=wdLine, Count:=1

Selection.TypeText Text:="name"

Selection.MoveDown Unit:=wdLine, Count:=1

Selection.TypeText Text:="nickname"

Selection.MoveRight Unit:=wdCharacter, Count:=1

Selection.MoveUp Unit:=wdLine, Count:=1

Selection.TypeText Text:="pa-00002-fullname"

Selection.MoveLeft Unit:=wdCharacter, Count:=13

Selection.TypeBackspace

Selection.EndKey Unit:=wdLine

Selection.MoveDown Unit:=wdLine, Count:=1

Selection.TypeText Text:="pa0002-ninckame"

Selection.MoveLeft Unit:=wdCharacter, Count:=6

Selection.Delete Unit:=wdCharacter, Count:=1

Selection.EndKey Unit:=wdLine

Hello guys...

i need ur experties about this.

can anyone out here help me in translating this vb code for OLE? thanks a lot in advance.

-Mark-

Documents.Add DocumentType:=wdNewBlankDocument

ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _

3, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _

wdAutoFitFixed

With Selection.Tables(1)

If .Style <> "Table Grid" Then

.Style = "Table Grid"

End If

.ApplyStyleHeadingRows = True

.ApplyStyleLastRow = True

.ApplyStyleFirstColumn = True

.ApplyStyleLastColumn = True

End With

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveRight Unit:=wdCell

Selection.MoveUp Unit:=wdLine, Count:=2

Selection.TypeText Text:="personal data"

Selection.MoveDown Unit:=wdLine, Count:=1

Selection.TypeText Text:="name"

Selection.MoveDown Unit:=wdLine, Count:=1

Selection.TypeText Text:="nickname"

Selection.MoveRight Unit:=wdCharacter, Count:=1

Selection.MoveUp Unit:=wdLine, Count:=1

Selection.TypeText Text:="pa-00002-fullname"

Selection.MoveLeft Unit:=wdCharacter, Count:=13

Selection.TypeBackspace

Selection.EndKey Unit:=wdLine

Selection.MoveDown Unit:=wdLine, Count:=1

Selection.TypeText Text:="pa0002-ninckame"

Selection.MoveLeft Unit:=wdCharacter, Count:=6

Selection.Delete Unit:=wdCharacter, Count:=1

Selection.EndKey Unit:=wdLine

1 REPLY 1
Read only

manuelhildemaro_ramossanc
Active Participant