|
-
May 9th, 2002, 07:16 AM
#1
Thread Starter
_______
Word
I have created a word object with a reference .. oWd
what is the syntax to open a word document.
oWd. ???????????????
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
May 9th, 2002, 07:48 AM
#2
search this forum for "Word automation" or "automate Word", this sort of thing is asked all the time - you'll get lots of useful tips for this and everything else you'll need to do with it once you have it open.
-
May 9th, 2002, 07:55 AM
#3
Frenzied Member
oWd.Documents.Open "Document Path"
-
May 9th, 2002, 07:57 AM
#4
Bouncy Member
heres a good tip
open up word, and record a macro of whatever you wanna do, then edit teh macro and youve pretty much got all the code you need in Vb right in front of you
-
May 9th, 2002, 08:22 AM
#5
Thread Starter
_______
Ok .. I have it all except one thing ..
comes up with a do you want to save changes...
how can I skip the conversation and just close the sucker as I am not making changes, I am only printing.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
May 9th, 2002, 08:26 AM
#6
when you close Word (or just a document) you can pass a "save the changes" parameter, just set it to false, eg:
oWord.Close SaveChanges := False
-
May 9th, 2002, 08:28 AM
#7
Thread Starter
_______
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
May 9th, 2002, 08:30 AM
#8
Bouncy Member
use one of these depending on what you want
VB Code:
ActiveDocument.Close wdDoNotSaveChanges
ActiveDocument.Close wdPromptToSaveChanges
ActiveDocument.Close wdSaveChanges
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|