Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving???

Status
Not open for further replies.

oobo

Programmer
Feb 9, 2005
1
US
Im creating a budget program, but my question is that i need some kind of code that would save the document as a .doc and also each time it is run it doesnt delete the previous entry. Thank you.
 
Creating a full Word .DOC in native "binary" format may be a lot of work in QB. Most of the tools that would help with the heavy lifting are COM components you can't use in QB.

Have you considered .RTF output instead?

See How To Output RTF-formatted Documents with ASP. Much of what is described there is easy to do in QB.
 
Are you talking about a Word .doc, or a plain text .doc?

if you want a text file...

Use...
Code:
Open "file.doc" for Output as #1
  Print #1, "Hello"
  print #1, "Etc..."
  '...
Close

If you need a word document, use VBA instead, which is built into Word...

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Is this for storage of budget data you are asking about? If so, the normal way is in a linked list database, using random file access methods.


Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
That or an ISAM database, depending on what form of QB you are using. The ISAM in VBDOS works nicely.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top