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 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.

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

Newvbguy

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?

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.