?
Solved

Embed Word 2003 Viewer/Word 2003 in VB6 Form for readonly file access

Posted on 2006-05-08
4
Medium Priority
?
428 Views
Last Modified: 2012-05-05
Hi

I would like to use the MS Word 2003 Viewer to allow users to view but not edit files in a VB6 app. The PC inquestion also has full Office 2003 on it. How can I embed one of these apps in a Vb6 form and prevent file changes -i.e. is it better/earier to use the Full Word 2003 with no save option?

Thanks

Andy
0
Comment
Question by:ajmcqueen
4 Comments
 
LVL 44

Assisted Solution

by:bruintje
bruintje earned 200 total points
ID: 16629371
Hello ajmcqueen,

you could see if embedding the document in an olecontainer is an alternative, embedding a viewer on a form could become difficult if at all possible

source: support.microsoft.com/?kbid=147804

hope this helps a bit
bruintje
0
 
LVL 6

Assisted Solution

by:cubixSoftware
cubixSoftware earned 200 total points
ID: 16630065
Hi

One way to do it is to add a web control to your form and then "navigate" to the document....

WebControl1.Navigate2 "C:\Test.doc"

You can then use the ExecWB method to set things like toolbars etc.

HTH :)
0
 
LVL 19

Accepted Solution

by:
Shauli earned 600 total points
ID: 16630574
Dim wordDoc As Object
Set wordDoc = CreateObject("Word.Application.8")

With wordDoc
   .Documents.Open FileName:="C:\Test.doc"
   .Visible = True
   .DisplayAlerts = False
   .CommandBars("Menu Bar").Controls("&File").Controls("Save &As...").Enabled = False
   .CommandBars("Menu Bar").Controls("&File").Controls("Save").Enabled = False
End With

S
0
 

Author Comment

by:ajmcqueen
ID: 16674534
I split the points as all the suggestions have merit but none quite solve my particular problem in the way that I want. I am going to take a different approach and probably use Group policy to bleck access.

Thanks any.

Andy
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question