Click here to Skip to main content
15,900,110 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Crystal Report on Basis of Dataset having multiple tables Pin
Rupesh Kumar Swami25-May-07 2:52
Rupesh Kumar Swami25-May-07 2:52 
GeneralRe: Crystal Report on Basis of Dataset having multiple tables Pin
Syed Ali Raza25-May-07 2:56
Syed Ali Raza25-May-07 2:56 
GeneralRe: Crystal Report on Basis of Dataset having multiple tables Pin
Syed Ali Raza25-May-07 3:33
Syed Ali Raza25-May-07 3:33 
GeneralRe: Crystal Report on Basis of Dataset having multiple tables Pin
Rupesh Kumar Swami25-May-07 4:24
Rupesh Kumar Swami25-May-07 4:24 
QuestionAutomate Microsoft Word From VB6 Pin
Carter Langley25-May-07 2:15
Carter Langley25-May-07 2:15 
AnswerRe: Automate Microsoft Word From VB6 Pin
Johan Hakkesteegt28-May-07 2:34
Johan Hakkesteegt28-May-07 2:34 
GeneralRe: Automate Microsoft Word From VB6 Pin
Carter Langley28-May-07 2:45
Carter Langley28-May-07 2:45 
GeneralRe: Automate Microsoft Word From VB6 Pin
Johan Hakkesteegt28-May-07 3:38
Johan Hakkesteegt28-May-07 3:38 
Johan wrote:
you won't have to struggle with getting Word to work and accept input, etc, etc.


Carter Langley wrote:
battling is putting it mildly


Which costs more vb.net or your mental health?

But seriously, besides the comments I posted earlier, I am afraid I can't help you further. My suggestion is to post only the bottom part of the code you posted in a new question:
Carter Langley wrote:
Set rstSearch = New ADODB.Recordset
rstSearch.Open "SELECT * FROM SQLSearchTextString", Cnn, adOpenDynamic, adLockOptimistic
If Not rstSearch.EOF Then
rstSearch.Delete adAffectCurrent
End If

rstSearch.AddNew
rstSearch.Fields("sqlsearch") = strSearch
rstSearch.Update
rstSearch.Close

'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

It works so far so i must say i am quite pleased with myself.
my problem is with the range object i think. i need to have more than one word on a line and i just cant seem to do this. the first line is to have the headers and the following lines are to have the information organised under the relevent headers.


I am sure that someone can help you with this, because it is not at all an uncommon automation project.

Carter Langley wrote:
my probably totally unprofessional attempt at coding


And don't sell yourself short. The question of professional or unprofessional coding is only interesting for the hardcore C++ nerds (they seem to have a real hangup about it Confused | :confused: ).

Good luck with it,

Johan

My advice is free, and you may get what you paid for.

Questioninternetwritefile in vb.net Pin
psiva198425-May-07 2:03
psiva198425-May-07 2:03 
AnswerRe: internetwritefile in vb.net Pin
Dave Kreskowiak25-May-07 3:28
mveDave Kreskowiak25-May-07 3:28 
Questionquery related to vb Pin
Ms. Shaheen25-May-07 1:59
Ms. Shaheen25-May-07 1:59 
AnswerRe: query related to vb Pin
Carter Langley25-May-07 2:21
Carter Langley25-May-07 2:21 
Questionquery related to vb Pin
Ms. Shaheen25-May-07 1:58
Ms. Shaheen25-May-07 1:58 
AnswerRe: query related to vb Pin
Kschuler25-May-07 7:47
Kschuler25-May-07 7:47 
Questionhow to add state property Pin
d_smit25-May-07 0:41
d_smit25-May-07 0:41 
AnswerRe: how to add state property Pin
Dave Kreskowiak25-May-07 3:21
mveDave Kreskowiak25-May-07 3:21 
Questionpassword protection [modified] Pin
Sonia Gupta25-May-07 0:17
Sonia Gupta25-May-07 0:17 
AnswerRe: password protection Pin
Dave Kreskowiak25-May-07 3:16
mveDave Kreskowiak25-May-07 3:16 
QuestionBackup Dbs in vb.net Pin
gitasnr24-May-07 23:54
gitasnr24-May-07 23:54 
AnswerRe: Backup Dbs in vb.net Pin
Colin Angus Mackay25-May-07 0:07
Colin Angus Mackay25-May-07 0:07 
GeneralRe: Backup Dbs in vb.net Pin
gitasnr25-May-07 0:19
gitasnr25-May-07 0:19 
GeneralRe: Backup Dbs in vb.net Pin
Dave Kreskowiak25-May-07 3:10
mveDave Kreskowiak25-May-07 3:10 
GeneralRe: Backup Dbs in vb.net Pin
Colin Angus Mackay25-May-07 8:03
Colin Angus Mackay25-May-07 8:03 
GeneralRe: Backup Dbs in vb.net Pin
Dave Kreskowiak25-May-07 11:56
mveDave Kreskowiak25-May-07 11:56 
GeneralRe: Backup Dbs in vb.net Pin
Johan Hakkesteegt28-May-07 3:01
Johan Hakkesteegt28-May-07 3:01 

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.