H
Harry-Wishes
Hello
I have extracted the html code from a web table embedded in a Word document
and stored it in a variable string as shown below. The Word document is saved
as an html page in Word.
Dim html_string as Stringhtml_string
ActiveDocument.HTMLProject.HTMLProjectItems(1).Text
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, count:=1
Selection.TypeText Text:=html_string '''LINE 5 is the problem line
It works very well when I test the script on Word documents with small
embedded html tables with few rows and columns but not everything gets stored
for large tables beyond a certain number of rows and columns. The string gets
truncated after some point. The truncation seems to take place when I execute
line 5 above (Selection.TypeText Text:html_string). The "html_string"
variable itselfs retains all of the html code when I throw it's output to the
screen so, I know for a fact something is happening when I place the contents
into the active Word document using the Selection.TypeText method. Is there
a character size limit when using the Selection.TypeText method? If so, is
there a way around this?
Thanks
Harry_Wishes
I have extracted the html code from a web table embedded in a Word document
and stored it in a variable string as shown below. The Word document is saved
as an html page in Word.
Dim html_string as Stringhtml_string
ActiveDocument.HTMLProject.HTMLProjectItems(1).Text
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, count:=1
Selection.TypeText Text:=html_string '''LINE 5 is the problem line
It works very well when I test the script on Word documents with small
embedded html tables with few rows and columns but not everything gets stored
for large tables beyond a certain number of rows and columns. The string gets
truncated after some point. The truncation seems to take place when I execute
line 5 above (Selection.TypeText Text:html_string). The "html_string"
variable itselfs retains all of the html code when I throw it's output to the
screen so, I know for a fact something is happening when I place the contents
into the active Word document using the Selection.TypeText method. Is there
a character size limit when using the Selection.TypeText method? If so, is
there a way around this?
Thanks
Harry_Wishes