k13r4n
12-01-2008, 12:00 PM
hi everyone
i have some experience using VB Script in web development but im completely new to VB for applications, and ive got stuck on what is probably a really daft thing.
I have a simple loop that grabs some info out of a table in excel and arranges it into a text string to use as a script for AutoCAD. That all works fine, the problem is i need the string to goto word so that it can be saved as a plain text file.
Ive managed to work out how to open a new word document by reading through the forums here but i cant work out how to put the string onto the page! :banghead:
Most examples talk about opening templates and using bookmarks but i dont want to do any of that i just want a string of text dumped on the page.
ive been searching the forums and the net for 2 days now and cant find out how, if anyone can help or point me to an artical i can read that would be great.
here is a snippit
Ive opened the new document
Set ObjWord = CreateObject("Word.application")
ObjWord.Visible = True
ObjWord.documents.Add
and i have my string
"rectang " & xStart & "," & yStart & " @" & pLength & "," & pWidth
Whats the bit of code i need to put infront of that string to make it display on the word document? I can get it to output to a cell in excel just fine but i cant get it onto the new word document :banghead:
Cheers
Kieran
i have some experience using VB Script in web development but im completely new to VB for applications, and ive got stuck on what is probably a really daft thing.
I have a simple loop that grabs some info out of a table in excel and arranges it into a text string to use as a script for AutoCAD. That all works fine, the problem is i need the string to goto word so that it can be saved as a plain text file.
Ive managed to work out how to open a new word document by reading through the forums here but i cant work out how to put the string onto the page! :banghead:
Most examples talk about opening templates and using bookmarks but i dont want to do any of that i just want a string of text dumped on the page.
ive been searching the forums and the net for 2 days now and cant find out how, if anyone can help or point me to an artical i can read that would be great.
here is a snippit
Ive opened the new document
Set ObjWord = CreateObject("Word.application")
ObjWord.Visible = True
ObjWord.documents.Add
and i have my string
"rectang " & xStart & "," & yStart & " @" & pLength & "," & pWidth
Whats the bit of code i need to put infront of that string to make it display on the word document? I can get it to output to a cell in excel just fine but i cant get it onto the new word document :banghead:
Cheers
Kieran