how to write value in a word table
how to write value in a word table
(OP)
I need to write a value (in red color) in the 2 tables of word doc?
note:
I just have a code to open a doc with a visible option.
part of cdoe:
....
Dim APP As Object
Dim DOC As Object
Set APP = CreateObject("WORD.Application")
APP.Visible = True
Set DOC = APP.documents.Open("C:\Lavori_Vb6\HOTEL\Fattura.doc")
....
https://files.engineering.com/getfile.aspx?folder=...
note:
I just have a code to open a doc with a visible option.
part of cdoe:
....
Dim APP As Object
Dim DOC As Object
Set APP = CreateObject("WORD.Application")
APP.Visible = True
Set DOC = APP.documents.Open("C:\Lavori_Vb6\HOTEL\Fattura.doc")
....
https://files.engineering.com/getfile.aspx?folder=...
RE: how to write value in a word table
DOC.Bookmarks("bkmMyBookMark").Range.Text = "Any text I want"
---- Andy
"Hmm...they have the internet on computers now"--Homer Simpson
RE: how to write value in a word table
database? VB Array? Set of variables?
RE: how to write value in a word table
worddoc.Tables(1).cell(1, 1).Range.text = "Any text " & stVariableText
Above is an example of combining hard coded text with variable text, if doing variables, remove hard coded text.
Cells are from left to right starting at 1. Looks like you may have two tables? If so, would need to identify the table number for each. So BANCA X - Via would be .cell(4,2) for the 4th row and 2nd col.
RE: how to write value in a word table
Set of variables
RE: how to write value in a word table