Visual Basic - Esto es Posible??????

Life is soft - evento anual de software empresarial
 
Vista:
sin imagen de perfil

Esto es Posible??????

Publicado por camilo andres (13 intervenciones) el 04/08/2015 01:43:52
office

Buenas tardes:

Es posible hacer lo que aparece en este vídeo de youtube??? https://www.youtube.com/watch?v=2dSKDpV1P0U

Abren microsoft word dentro de una aplicación de visual Basic. He buscado información por todos lados pero no veo que se pueda hacer.

Sera un montaje?? o alguno de ustedes sabe como hacerlo.

Esta muy interesante y seria muy practico

Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 21
Ha mantenido su posición en Visual Basic (en relación al último mes)
Gráfica de Visual Basic

Esto es Posible??????

Publicado por Rafael (68 intervenciones) el 04/08/2015 12:37:45
Ya un montaje con que fin???

Bueno como sea no has buscado correctamente o no has buscado lo que necesitas...

Microsoft te dice como hacerlo:
https://support.microsoft.com/en-us/kb/242243

Te rescato el codigo para futuras coincidencias:
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
Option Explicit
 
Dim oDocument As Object
 
Private Sub Command1_Click()
   On Error GoTo Err_Handler
 
 ' Create a new Word Document...
   OLE1.CreateEmbed vbNullString, "Word.Document"
 
 ' Add some text to the document. The OLE.Object
 ' property returns the document object...
   Set oDocument = OLE1.object
 
 
   oDocument.Content.Select
   With oDocument.Application.Selection
 
   ' Add a heading at the top of the document...
      .Style = oDocument.Styles("Heading 1")
      .Font.Color = &HFF0000
      .TypeText "Blue Sky Airlines"
      .ParagraphFormat.Alignment = 1 '[wdAlignParagraphCenter]
      .TypeParagraph
      .TypeParagraph
 
    ' Now add some text...
      .TypeText "Dear Mr. Smith,"
      .TypeParagraph
      .TypeParagraph
      .TypeText "Thank you for your interest in our current fares " & _
                "from Oakland to Sacramento. We guarantee to be " & _
                "the lowest price for local flights, or we'll " & _
                "offer to make your next flight FREE!"
      .TypeParagraph
      .TypeParagraph
      .TypeText "The current fare for a flight leaving Oakland " & _
                "on October 4, 1999 and arriving in Sacramento " & _
                "the same day is $54.00."
      .TypeParagraph
      .TypeParagraph
      .TypeText "We hope you will choose to fly Blue Sky Airlines."
      .TypeParagraph
      .TypeParagraph
      .TypeText "Sincerely,"
      .TypeParagraph
      .TypeParagraph
      .TypeParagraph
      .TypeText "John Taylor"
      .TypeParagraph
      .Font.Italic = True
      .TypeText "Regional Sales Manager"
      .TypeParagraph
 
   End With
 
 ' Zoom to see entire document...
   OLE1.SizeMode = 3
   OLE1.DoVerb -1
 
   Command1.Enabled = False
   Command2.Enabled = False
   Command3.Enabled = True
   Exit Sub
 
 
Err_Handler:
   MsgBox "An error occurred: " & Err.Description, vbCritical
End Sub
 
Private Sub Command2_Click()
   On Error GoTo Err_Handler
 
 ' Create an embedded object using the data
 ' stored in Test.doc.<?xm-insertion_mark_start author="v-thomr" time="20070327T040719-0600"?> If this code is run in Microsoft Office
 ' Word 2007, change the file name to Test.docx.<?xm-insertion_mark_end?><?xm-deletion_mark author="v-thomr" time="20070327T040717-0600" data=".."?>
   OLE1.CreateEmbed "C:\Test.doc"
 
   Command1.Enabled = False
   Command2.Enabled = False
   Command3.Enabled = True
   Exit Sub
 
Err_Handler:
   MsgBox "The file 'C:\Test.doc' does not exist" & _
          " or cannot be opened.", vbCritical
End Sub
 
Private Sub Command3_Click()
   On Error Resume Next
 
 ' Delete the existinf test file (if any)...
   Kill "C:\Test.doc"
 
 ' Save the file as a native Word DOC file...
   oDocument.SaveAs "C:\Test.doc"
   Set oDocument = Nothing
 
 ' Close the OLE object and remove it...
   OLE1.Close
   OLE1.Delete
 
   Command1.Enabled = True
   Command2.Enabled = True
   Command3.Enabled = False
End Sub
 
 
Private Sub Form_Load()
   Command1.Caption = "Create"
   Command2.Caption = "Open"
   Command3.Caption = "Save"
   Command3.Enabled = False
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Esto es Posible??????

Publicado por camilo andres (13 intervenciones) el 18/08/2015 00:37:49
No he buscado correctamente?? si lees ese codigo no aplica para visual .net ya que este no incorpora el contenedor OLE.

La proxima vez que quieras responder, si lo vas a hacer de mala gana mejor no lo hagas que si vos sabes mucho te felicito pero hay personas como yo que apenas estamos aprendiendo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar