Solved

Access OLE Object Methods from IE Object

Posted on 2002-07-11
4
205 Views
Last Modified: 2013-11-26
My VB application uses the "WebBrowser" Control.
I used the "Navigate" Method in order to Surf to a Word Document(.Doc). now I want (from my VB application) to create a button that access methods from the Word Object (for example, the print method).

Please don't send me workarounds, code samples will be appreciated.
0
Comment
Question by:avissar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 6

Expert Comment

by:MELeBlanc
ID: 7145851
What other types of functions are you wanting to access?

For say printing, you can use the WebBrowser control's ExecWB command to do tasks such as printing...

WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DODEFAULT

0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 300 total points
ID: 7146518
Try this:
'set a reference to microsoft word x object library
option explicit

dim wdoc as word.document
' in Document_complete event of webbrowser paste this:
if (pdisp is webbrowser1.object)
   set wdoc= webbrowser1.document
   'example of how to access Word DOM:
   wdoc.PrintPreview
   ' and so on...
end if

Hope it helps
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8002332
Hi avissar,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept Richie_Simonetti's comment(s) as an answer.

avissar, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8095332
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access Search and Replace Using VBA 6 104
Problem to With line 4 85
transition to visual .net from vb6 5 77
SQL Server 2012 to SQL Server 2016 24 51
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

739 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