Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Convert Word Document To A Database Field


I am developing a tutorial in which i require to make a table with a field of 80 charecters containg the text. The problem is that i have a large amount of text typed in .doc format i need a code which reads this doc format and place 80 charecters in each record automatically. My database is access




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Convert Html To Word Docuemtn Using The Word Document Object
i ant in vb6 to open an html page
and convert and save it as word *.doc
how can i do this?
and is it possible to open the html file from the internet with a give url so i will be :
open html document from www..../1.html -> save as 1.doc
thnaks in advance
peleg

Convert Word Document To XML
Does anyone know how to convert Word documents to XML?

How To Convert Ms Word Document To Pdf File
Good day!

I'm seeking for a solution on how can i convert any existing .doc file to .pdf file using vb 6.0.
Is there any free components or dll's available?
If you any idea please help me

Thanks in advance!

Convert Html To Word Document
I would like to use either Visual Basic 6 or VBA to convert a html file to a word document. Does anyone have a idea on how to do this? Are their some code examples that demonstrate how to do this?

Text To Word Document Convert
Dear All,
I have a Richtext box control in my form.Now i want to convert the text in the RTB into a word Document.Now i user the method

VB Code:
RTB.Savefile "C: est.doc",rtftext


But this is not doing any formating.Is there any code avalible to format the contents in the rich text box like Font bold, Paragraph

Text To Word Document Convert
Dear All,
I have a Richtext box control in my form.Now i want to convert the text in the RTB into a word Document.Now i user the method


RTB.Savefile "C: est.doc",rtftext



But this is not doing any formating.Is there any code avalible to format the contents in the rich text box like Font bold, Paragraph

How Do I Convert A Microsoft Word Document To Vb Code?
im sorry for probably such a dumb question but i am a member of the ipaqhq forums and there is a section where you can set up this thing called MY PDA to display all the programs you have in your ipaq.

anyway i was up late lastnight creating one with hyperlinks to all of my software using microsoft word, it took me a couple of hours.

only to find out that it wouldn't post correctly because it need to be vb code.

here is what it is supposed to look like.

http://www.ipaqhq.com/forums/vbgarag...=view&id=12136

i dont want all of that to go to waste so is there a way to convert the word document to vb code?

i have done some searching but i cant seem to find anything on this...

much! much! much! appreciation in advance.

A Button To Convert A Word Document To PDF And Send It By Email --with VB6
Hi there,

I want to add a button to Word to convert the current document to PDF and send it by email to a list of emails I have on an XML file on a remote server.

Is this possible with VB6?

If it is, can you give me some examples/articles on...
1. How to create/add the button itself
2. How to convert the current document to PDF
3. How to read a remote XML file
4. How to send emails

Thank you!!

Convert Word Document Or Text File To BLOB
I am using an Access database as my backend. I am able now to convert image files to BLOB to stor in the access database. I have read a little snippet on covnert a word document to BLOB for SQL, but I am wonder if there is a way to convert a word document on text file to BLOB format and store it in an Access database? Does anyone have any ideas on how to accomplish this?

Thanks, Chester

Update Field In Word Document That Does Not Have A Value
Hi All

I am entering values to my document using this command:
--> oDoc.Variables("name").Value = x <--

After I finish to fill some of the values I do this command:
--> oDoc.Fields.Update <--

The problem is that in variables that I did not entered any value I get instad of nothing the message:
--> "Error! No document variable supplied." <--

Does anyone have sujestions??
How can I make it happend so variables that does not get any value will stay empty.


Thanks A lot
Solo1

Save Word Document Filename As Field
I think I have a fairly simple question about a word macro.
I am very new to all this but just wanted to know if I could have my macro save the document with the filename "Invoice for [month]" where [month] is the MMMM date field, so that every month it obviously saves as a different name. It would also be nice if I could specify the exact folder so it was something like C:FilesInvoicesInvoice for August.doc for example.

Thanks for the help

-Justin

Btw, I'm using word 2002 if that makes any difference.

Opening A Word Document That Is In A BLOB Field Of A Table From VB
Hi everybody, I need help again. I have to open a word document that is saved in a BLOB field in an Oracle database from Visual Basic, but without downloading the document to disk. Is there anyway to do this? Any options in the sentence Open of the Word.application object?

Thanks

Xtian

Saving Word Document In Access OLE Object Field
I want to make a dll that could transfer a docment of word in the OLE object of MS Access and user will be able to access that document by double clicking on the field of Access OLE Object Field.
Any Idea!
Zia

Convert Database Field Type
I am trying to convert a field in an existing Access database from character to integer. My code is: td.Fields(0).Type = dbInteger

I get an invalid operation error with this code. If you can't change a field type on an existing database, then what can I do to convert the field?

Convert A BLOB Type Field From A Database Back Into A File.
I wish to convert a BLOB type field from an Oracle8
database to a bitmap file because it stores bitmap
data. How do I proceed?

Sathyaish.

Database To Word Document
Can someone help me please?

I need the syntax to retrieve data from the SQL database and place it in a Word document.

I can retrieve data from the database and put it into Excel but I am stumped on putting it into Word.

Any help would be appreciated as I have searched the tutorials and threads and I can find no assistance.

Thanks.

Word Document As Database
Hi there,

Does anybody knows the vba code to read data from a word document thats used as datasource?!

thanks

Saving Word Document To Database
Hi there.

I was wondering if its possible to save a word document to a database.

I kinda poked around the forum looking for specific threads but didn't find anything.

I am using VB6 and Acces97. I am using ADO to connect. None of my controls are data bound and I'm using SQL to query the database.

I saw the tutorial for storing images and wondered if it was similar.

I have no idea where to start. Maybe if there's documentation on this someone could lead me in the right direction?

Any help is appreciated.


Thanks


Max


*edit

Perhaps as an alternative if I could export the text from VB to a word document, and then take the text from the word document and store it into the database?

I read in another post that storing word docs to a database could severly bloat it. My aim is to get info from the database and put it into the word document, type some additional text and then store it all back into the database.

The word document serves as a quote form. What I'm trying to do is save all of the quotes without having hundreds of word documents sitting around in a folder. I'd much rather work from a template and keep the text stored in the database.

Database Fields In Word Document
Does anyone know how I can get fields from my database into a Word document (eg name and address at the top and salutation after Dear ) a bit like a mailmerge but only for one letter at a time?

Storing A Word Document In A Database
Is there anyway to store a document in a database or allow a user to choose a document to save and then add a reference or something to the database so the next time a user loads up the form they can view the associated document ????

Parsing Word Document To Store In Database
if any one have any sample or document which can help me to parse word document to store in database

Word Document Data To Access Database
Hi everybody

I have a slight problem with my application that I'm working right now.

Problem is:

I have a Word document with Text - fields and Access Database for the iformation.

What I need to do is to read these text - fields to the access database fields.

I'm new with visual basic so I don't know all the trics. Would someone give me some pointers how to activate this outside Word document in access.

Other way around I could do this, but I don't want to add visual basic objects to the Word document, because the document goes ti customer and it only will slow down documents loading and using.

Thank you for your help

Embedded Data From Database To Word Document
I want to embedded query result to existing word document, for example:

'I have a document that contain this text
hi my name is :

'then I want embedded the name to it from my db...

pls advice..
thanks

Picture From Database To Word Document And Resized
Hi,

Does anybody know how to insert a picture from a database to a bookmark in a Word Document using vb.

I know how to insert text from a database to word, using the range method etc. Unfortunatley i'm not sure how to insert a picture.

Additional, the picture needs to be resized. This is because all pictures need to be the same size. I know what your going to say, make the pictures the same size before you put them in a database. The problem is they may not look good when in word document.

Can anyone help me please?

How Can You Store An Ole Word Document In A Access Database?
i want to save a paragraph in a access database but can not use a text box. can anyone help me?

Can Excel Format Be Convert Word Document Format??
can I write the macro that convert the excel data to word?

Database Lookup - Insert Fields In Word Document.
Hi,

I have created the starting macros that pull up a standard, pre-made form of either a letterhead, memo, fax or minutes sheet.

What I am trying to do then, is have a dialog box that will allow you to choose;

1. the 'author' of the document (from an easily updatable list of employees and their details),
2. a contact person (from this same list),
3. the recipient's name (single line input), and
4. their address (multi-line input).

... and have this information and linked info (such as author's phone number) be inserted into the relevant document. I have created fields in the main documents such as {author}, {author's phone} and {recipient} - but am finding it hard to fathom this macro.

Can anyone help me?

Scott.

Insert Formatted Text From A Word Document Into An Oracle Database!
Hi all!

I have a Word document with formatted text (bold, enters, italic, ...) in a cell of a table. Now, how is it possible to save the content of this table text in an Oracle database? After this, I will use this text again in an other document in the same format!

When I execute the next code, i only get the text of the cell, without the formatting stuff.


Dim oraSession As Object
Dim oraDatabase As Object
Set oraSession = CreateObject("OracleInProcServer.XoraSession")
Set oraDatabase = oraSession.Opendatabase("sherpa", "user/passw", 0&)
TableCell = ActiveDocument.Tables(1).Cell(1, 1)
oraDatabase.Executesql ("Insert into test_tekst values (test_tekst_seq.nextval,'" & TableCell & "')")


Filip

Opening Word Document From Excel When The Word Document Is Read Only
I'm trying to open a Word document from Excel and have hit a snag. The file I'm trying to access is Read-only and the code stops when the "This file is read-only..." prompt displays. How do I get past this? Here's the code that I have so far (thanks to some help from this forum):

Code:
Sub OpenAndPrint()
Dim wdApp As Word.Application
Dim wdDoc As Word.Document
Dim stPathName As String

stPathName = Range("B4").Hyperlinks(1).Address

If Dir(stPathName) <> "" Then
Set wdApp = New Word.Application
wdApp.Visible = True
wdApp.DisplayAlerts = wdAlertsNone 'Tried to turn off the prompt, but it didn't work.
Set wdDoc = wdApp.Documents.Open(stPathName) 'Code stops here and waits for the user to respond to the prompt.
Set wdDoc = Nothing
Set wdApp = Nothing
Else
MsgBox "The file does not exist!", vbInformation
End If

End Sub

MS Word 2000: Closing Forms In A Document From Another Document With Code
I have a project, in which I use a global template to manipulate different other templates. In those templates there are Userforms built in to gather information to use in a MailMerge. The problem I'm having is that I want only to hide the forms in the templates themselves, and close them in the global template when the whole application is closed. The trouble is that I can't find a way to access the open forms from the global template. Can anybody help me?

Merging/Importing Word, Excel, Powerpoint And Visio Files Into A Word Document
Does anyone know how to do this or know of a website that has source code that does this? I can't find anything anywhere.

Each Page/Worksheet/Slide goes on a seperate page. Print formatting is retained (landscape/portrait) and if the imported Page/Worksheet/Slide is larger than the page im merging/importing to, it should auto-resize to fit the page.

Thx.

Reading The Word Document From Visual Basic Without Opening The Word Applicaiton
Hi

I need to access the word document from visual basic without opening the word application. I can do this by opening the word application. Is there any other way to read a document from vb.

I need to search for a particular word in the document without opening the word application.

Waiting for your reply,

thanks

Mohan

Accessing Word Document 'header/footer' Via Word Object Library
Hi All

As the title suggests really, I can access everything I need on a Word document opened via the Word Library object but I can't find how I access the headers and footers of a docuemnt

Many Thanks
Steve

Merging Word, Excel, Powerpoint And Visio Files Into A Word Document
Does anyone know how to do this or know of a website that has source code that does this? I can't find anything anywhere.

Thx.

I posted this in VB General but then i saw this forum so I wasn't sure where it belonged and posted in both. Reply to either one.

Error 4605 Calling Word.Document.Save With Word 2002 SP1
I have a test VB6 exe project with a WebBrowser control, called web1 (added via Project, Components, Microsoft Internal Controls). My project also references the Microsoft Word 10.0 Object Library.

As well as the WebBrowser control, my form has a Save button (cmdSave). Here is the complete code:


Code:

Private g_objDocument As Word.Document

Private Sub cmdSave_Click()
g_objDocument.Save
End Sub

Private Sub Form_Load()
Dim strFileName As String
strFileName = App.Path & "WordWrapper.doc"
web1.Navigate strFileName
End Sub

Private Sub web1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
Set g_objDocument = pDisp.Document
End Sub


The idea is when I run the exe, it loads a Word document into the WebBrowser control. This document is also assigned to
a global Word.Document object, g_objDocument, when web1 navigates to it. The problem occurs when I try to save the document (in cmdSave_Click). I get the error:

"The Save method or property is not available because this document is in another application."

This error occurs with Word 2002 SP 1 (on Windows XP), but not with Word 2000 SP3.

Please help.

How Can I Convert An RTF Document To PDF Format
Does any body know how I can convert an RTF document to PDF?
Please I need suggestions or reliable 3rd-party DLLs anybody has used before.

Thanks

Load Word Document In VB Form And Use Word's Zoom Features - Help
Hi

I've this VB6 application where I can opt to load a word document or scaned 8X11 image of a paper form on the VB form and let user write or draw using a tablet. Since screen doesn't have enough space to show complete form at one time, I need to zoom it down to fit the screen so it get mapped properly with tablet. Once user is done drawing or writing, I need to bring the document or image back to original size and print it or save it.

I don't know where to start. Plese guide me about the best way to accomplish this. Thanks.

Load Word Document On VB Form And Use Word's Zoom Fetrures - Help
Hi

I've this VB6 application where I can opt to load a word document or scaned 8X11 image of a paper form on the VB form and let user write or draw using a tablet. Since screen doesn't have enough space to show complete form at one time, I need to zoom it down to fit the screen so it get mapped properly with tablet. Once user is done drawing or writing, I need to bring the document or image back to original size and print it or save it.

I don't know where to start. Plese guide me about the best way to accomplish this. Thanks.

VB In Access To Find And Format A Word In A Mailmerged Word Document
I use my Access data base to create mail merged letters to our customers. Not only are the names etc stored on the database I also store the content of the letter in memo fields. I have occasions where I want the newly created letter to have some words bold. After having VB code open the main document, mail merge then close the main document I run the following code. It works the first time round, the specified word becomes bold. However after closing the letter and running it a second time the new letter opens but no changes are made and I get an error. "Run Time error '462' : The remote server machine does not exist or is unavailable". This gives me a Debug option. When selecting debug The first row in this code is selected.

With ActiveDocument.Content.Find

    .ClearFormatting
    .Font.Bold = False
    .MatchCase = True
    .Text = "SATURDAY"
    With .Replacement
        .ClearFormatting
        .Font.Bold = True
        .Text = "SATURDAY"
    End With
    .Execute Format:=True, Replace:=wdReplaceAll
End With

If I leave the new letter open and re run it the code opens a second new letter with no errors, however it does not make the changes to the newest document only the first new document it finds. ie If I then close the first one created and rerun it the second document will have the changes made and the third one does not change. The error only occurs once I have closed all new documents and try to open another letter.


Hope someone can help

MSAccess Database DOA

Word Automation - Retaining The Numbering Format In New Word Document
Hi all,

I am using word automation to read a word document. I use word automation to read the word document page by page and paste the contents of each page in a new document.

The problem i am facing is, the word document which is read contains Heading1,Heading 2 etc and these are numbered. When I paste these pages onto a new document the numbering is not retained. (Eg., if my Heading1 number is 2.1 when i paste it in a new document the Heading1 number is shown as 1.1)

VBA: Creating Word, And Sending Data To A Word Document Using Ranges
The following code works fine when it is executed only once in any instance of the VB program.

It is OK provided I do not close Word, and it will create multiple instances of the document into the same instance or word.

Screen.MousePointer = 11
GetWord2
WordApp.Documents.Open ("C:Program FilesWill WizardTemplatesClauseLib.doc")
set MyDoc = Documents.Open(FileName:="C:Program FilesWill WizardTemplatesClauseLib.doc")
set FldRng(1) = MyDoc.Range(Start:=MyDoc.Bookmarks("Name").Range.End, End:=MyDoc.Bookmarks("NameEnd").Start - 1) 'read bookmarks into range object variables
FldRng(1).Text = ClauseHold 'put the stuff into the document
WordApp.ActiveDocument.SaveAS FileName:=("C:Program FilesWill WizardTemplates emp" & Trim(Str(TMPNum)) & ".doc")
WordApp.Application.Activate
WordApp.Visible = true
set WordApp = nothing
set MyDoc = nothing
Screen.MousePointer = 0
Command8.Enabled = true
Exit Sub



If Word is closed, and the code is executed again, an error occurs "the remote server machine does not exist or is not available" The only remedy for this is close and re-start the VB application containing this code.

The GetWord2 et-al Function codes are: (which is stored in a module)

option Explicit
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (byval lpClassName as string, byval lpWindowName as string) as Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (byval hwnd as Long, byval wMsg as Long, byval wParam as Long, byval lParam as Long) as Long
public WordApp as Word.Application
public WordWasNotRunning as Boolean ' Flag for final word unload

public Sub DetectWord()
' Procedure detects a running Word and r
' egisters it.
Const WM_USER = 1024
Dim hwnd as Long
' If Word is running this API call retur
' ns its handle.
hwnd = FindWindow("OpusApp", vbNullString)
If hwnd = 0 then ' 0 means Word Not running.
Exit Sub
else
' Word is running so use the SendMessage
' API function to enter it in the Running
' Object Table.
SendMessage hwnd, WM_USER + 18, 0, 0
End If
End Sub
public Sub GetWord2()

' Test to see if there is a copy of Micr
' osoft Word already running.
on error resume next ' Defer error trapping.
' Getobject function called without the
' first argument returns a
' reference to an instance of the applic
' ation. If the application isn't
' running, an error occurs.
set WordApp = GetObject(, "Word.Application")
If Err.Number &lt;&gt; 0 then
WordWasNotRunning = true
else
WordWasNotRunning = false
End If
Err.Clear ' Clear Err object In Case error occurred.
' Check for Microsoft Word. If Microsoft
' Word is running,
' enter it into the Running Object table
' .
DetectWord
If WordWasNotRunning = true then
'set the object variable to start a new
' instance of Word.
set WordApp = new Word.Application
End If
' Show Microsoft Word through its Applic
' ation property. then
' show the actual window containing the
' file using the Windows
' collection of the MyWord object refere
' nce.
WordApp.Visible = true
WordApp.Application.WindowState = wdWindowStateNormal
Screen.MousePointer = vbDefault
End Sub



do I need to close the document? = deactivate something?

I would like a code example on how to fix the above, else, any suggestions, ideas...


Jason.

A Search Of A Word Document And .XLS Document
Hello,
I need to search a word document for time values that look like this 13:43:42. Find them in a spreadsheet document. Once found there are 3 columns of data in the .xls that correspond to the time. This then needs to go into a .txt file. Then need to search the word document again for the next time and do again. When done the final .txt file should have the time and cooresponding data across the page. Who out there can put this together to run in a macro?

Word Document (*.DOC) And WordPad Document (*.DOC) ?
Hi,

I need to identify that a document file (*.DOC) is a Word document or a WordPad document in me program. Because WordPad can not open always a file (*.DOC) which can be openned by WORD.

Thanks

nYU

Word: Counting A Specific String In A Word Document
Hi all,

After visiting the Word FAQ I couldn't find any clue for my query:
I would like to count (in VB) how many times the string "Yesterday"
appears in a word document I am working on.

By using the manual Replace function (replacing "Yesterday" by "Yesterday"),
Word tells you how many replacement it has done and therefore how many
instances of the string "Yesterday" were in the document.

Can anyone point me in the right direction about using VB to find out
how many times "Yesterday" appears in my document, please?

Many thanks
Francois

Can I Insert A Word In The Cursor Position In A Word Document
I use this statement in VBA2000:

ActiveDocument.Content.InsertAfter ("USA")

but it alwasy insert at the end.

How can I insert a word in the cursor position?

Selecting A Particular Word From A Word Document (.doc) Through Visual Basic 6
I am a developer using Visual Basic 6. One of my program accepts some values through text boxes and then creates a Word document. The text boxes are optional, and the created Word document contains only non-empty values along with appropriate labels. I am able to apply styles (bold and underline) to entire paragraphs. But the user wants me to apply bold formatting only to values entered by him and not to the labels which describe those values. Please help me.

Thank You.

Lalit Kumar Barik
India

How To Convert An Html Document To Plain Text?
Read the title thanks

Or how To Parse the source

How To Convert Field Into Uppercase
I recall from my Access Level II class, an update query to convert lower into upper case.....I can't find the command anywhere. I would appreciate your help!

Convert A String To A Field Name ?
I have a db with several fields myfield1, myfield2, myfield3

I would like to do something like;
Dim X as integer, y as string
With Mydatabase
For x = 1 to 5
thefield = "myfield" & X
if !thefield = "ABC" then do something
next

How do I get "myfield" & x converted into something that can be interpreted as a valid field name.

In the (very) old days with Clipper, I seem to recall something about converting a string to a literal.

Copyright © 2005-08 www.BigResource.com, All rights reserved