Click here to Skip to main content
16,013,548 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: TabPages Disabling Pin
Dave Kreskowiak28-May-07 16:26
mveDave Kreskowiak28-May-07 16:26 
AnswerRe: TabPages Disabling Pin
Ali 11028-May-07 20:20
Ali 11028-May-07 20:20 
GeneralRe: TabPages Disabling Pin
advansis29-May-07 4:04
advansis29-May-07 4:04 
QuestionUsing Invoke with a Timer control Pin
Diego F.28-May-07 5:58
Diego F.28-May-07 5:58 
AnswerRe: Using Invoke with a Timer control Pin
Dave Kreskowiak28-May-07 16:19
mveDave Kreskowiak28-May-07 16:19 
Questioninvoke event handlers Pin
Maddie from Dartford28-May-07 4:05
Maddie from Dartford28-May-07 4:05 
AnswerRe: invoke event handlers Pin
Taylor Kobani28-May-07 8:02
Taylor Kobani28-May-07 8:02 
QuestionAutomate Word from VB6 Pin
Carter Langley28-May-07 3:47
Carter Langley28-May-07 3:47 
'Start Word and open the document template.
Set oWord = CreateObject("Word.Application")
oWord.Visible = True
Set oDoc = oWord.Documents.Add
oDoc.PageSetup.Orientation = wdOrientLandscape
oDoc.PageSetup.LeftMargin = 10
oDoc.PageSetup.RightMargin = 10
oDoc.PageSetup.TopMargin = 30

'Insert a paragraph at the beginning of the document.
Set oPara1 = oDoc.Content.Paragraphs.Add
oPara1.Range.Text = "Diamant Drilling Services Run Report"
oPara1.Range.Font.Name = "Arial Rounded MT Bold"
oPara1.Range.Font.Color = wdColorBlue
oPara1.Range.Font.Size = 28
oPara1.Range.Font.Bold = False
oPara1.Range.InsertParagraphAfter
oPara1.Range.InsertParagraphAfter

Set oPara1 = oDoc.Content.Paragraphs.Add
oPara1.Range.Text = "QDC"
oPara1.Range.Font.Name = "Arial"
oPara1.Range.Font.Color = wdColorBlue
oPara1.Range.Font.Size = 8
oPara1.Range.Font.Bold = True


Ok, there is the code that opens word, opens a new document and starts to insert some things into it. my problem begins with the last block of code. once it has written the word "QDC", how do i then write another word after it on the same line without overwriting the "QDC"Confused | :confused:

I am extracting info from a database and the recordset is going to be used to populate the document. So you will have the following senario:-

QDC TYPE NUMBER
SPH423 PDC S6L1543


the second line contains the data that is extracted from the database and has to be inserted under the relevent "column headings". there might be only one record or there might be over 200, depends on what the user has searched for.

Any ideas on how to do this guys?
AnswerRe: Automate Word from VB6 Pin
ips_sun31-May-07 23:59
ips_sun31-May-07 23:59 
QuestionHow to create CSV file by using data from a table? Pin
virendra_00728-May-07 3:28
virendra_00728-May-07 3:28 
AnswerRe: How to create CSV file by using data from a table? Pin
Christian Graus28-May-07 12:59
protectorChristian Graus28-May-07 12:59 
Questionreading xmlvalue Pin
balakpn28-May-07 2:03
balakpn28-May-07 2:03 
Answerxml file is here for the above question Pin
balakpn28-May-07 2:10
balakpn28-May-07 2:10 
QuestionImage to and from database Pin
Dileep_Vickey28-May-07 1:15
Dileep_Vickey28-May-07 1:15 
QuestionDatagrid problem Pin
Yogesh Kumar Chauhan28-May-07 1:00
Yogesh Kumar Chauhan28-May-07 1:00 
AnswerRe: Datagrid problem Pin
Christian Graus28-May-07 1:04
protectorChristian Graus28-May-07 1:04 
QuestionRandom display of items Pin
samerh28-May-07 0:36
samerh28-May-07 0:36 
AnswerRe: Random display of items Pin
Christian Graus28-May-07 0:45
protectorChristian Graus28-May-07 0:45 
GeneralRe: Random display of items Pin
samerh28-May-07 1:44
samerh28-May-07 1:44 
GeneralRe: Random display of items Pin
Christian Graus28-May-07 11:07
protectorChristian Graus28-May-07 11:07 
AnswerRe: Random display of items Pin
CPallini28-May-07 1:47
mveCPallini28-May-07 1:47 
GeneralRe: Random display of items Pin
Christian Graus28-May-07 11:07
protectorChristian Graus28-May-07 11:07 
Questionprogress bar Pin
charchabil0328-May-07 0:05
charchabil0328-May-07 0:05 
AnswerRe: progress bar Pin
Christian Graus28-May-07 0:10
protectorChristian Graus28-May-07 0:10 
AnswerRe: progress bar Pin
Xandip28-May-07 0:23
Xandip28-May-07 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.