Click here to Skip to main content
15,894,460 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Ok Now I got the generate my data from my application Now I am having trouble formatting Example:
I want to put a nice graphic as the header
also I would like to get data from my text boxes. right now I can get one textbox entry. when I do two the text appears with no spaces. here is my code
VB
'Insert a paragraph at beginning of the document
oPara1 = oDoc.Content.Paragraphs.Add
oPara1.Range.Text = Customer_Data.CustomerTextBox.Text & Customer_Data.CountyTextBox1.Text
oPara1.Range.Font.Bold = True
oPara1.Format.SpaceAfter = 24 '24 pt spacing after paragraph.
oPara1.Range.InsertParagraphAfter()
Posted
Updated 14-Aug-12 18:07pm
v2

1 solution

This is simular to the example here:
http://support.microsoft.com/kb/316383[^]

So are your textboxes empty?
 
Share this answer
 
Comments
icecode 17-Aug-12 0:15am    
Sorry for the delay but yes the text boxes are empty. I am about to check out your link. thank you.
icecode 17-Aug-12 1:57am    
Ok now I like the idea to use template but it wont transfer over any other ideas here is a pasting of my code if there are any tips:

'Start word Document template
oWord = CreateObject("Word.Application")
oWord.Visible = True
oDoc = oWord.Documents.Add("C:\Program Files\QC7\Field Quality Report.dotm")


oDoc.Bookmarks.Item("District").Range.Text = Customer_Data.CustomerTextBox.Text

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900