954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Printing Problem

Hi there,
I'm trying to print an ms word file using vb. Before it will go to printer, I want the document file to be viewable but not editable. Can anyone help me.
Thanks,

Note: I was able to view the doc file but it is editable. I am using ms word 8.0 object library.

Newvbguy

NewVBguy
Junior Poster in Training
71 posts since Mar 2005
Reputation Points: 13
Solved Threads: 3
 
Hi there, I'm trying to print an ms word file using vb. Before it will go to printer, I want the document file to be viewable but not editable. Can anyone help me. Thanks, Note: I was able to view the doc file but it is editable. I am using ms word 8.0 object library. Newvbguy


Hi, can you please send me a copy of your program to play about with, and I can see what I can do for you.

uniquestar
Posting Whiz in Training
245 posts since Feb 2005
Reputation Points: 49
Solved Threads: 11
 

Hi,
Thanks for your response but i just got the solution of my problem.
Cheers!!

Newvbguy

NewVBguy
Junior Poster in Training
71 posts since Mar 2005
Reputation Points: 13
Solved Threads: 3
 

Hi, Thanks for your response but i just got the solution of my problem. Cheers!!

Newvbguy

If it's not a bother, would you mind posting how you went about accomplishing this task?

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 
If it's not a bother, would you mind posting how you went about accomplishing this task?

Hi,
This is a simple sample:

Private Sub Command1_Click()

Dim objWord As Word.Application

Set objWord = New Word.Application
objWord.Visible = True
objWord.Documents.Open "z:\test2.doc", , True, False
objWord.PrintPreview = True
objWord.WindowState = wdWindowStateMaximize
objWord.ShowMe
End Sub

NewVBguy
Junior Poster in Training
71 posts since Mar 2005
Reputation Points: 13
Solved Threads: 3
 

I Certainly appreciate the update. Now I have this in my bag of tricks of the future :)

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You