Word document in a userform

teodormircea

Active Member
Joined
Jan 8, 2008
Messages
331
Hello Forum,

How can i add an word document to an userform with Microsoft Office Document Imaging Viewer.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Not sure if you can add a Word document (.doc file) if that is what you mean, since MODI is designed to show images. Try these steps:

1. If not already there, add the MODI Viewer to the Controls Toolbox in VB by right-clicking Controls Toolbox - Additional Controls... and select Microsoft Office Document Imaging Viewer Control 11.0.

2. Put the MODI Viewer control on your userform. This is named MiDocView1 by default.

3. Use this code to load the viewer with an image file:

Code:
Private Sub UserForm_Initialize()

    Dim MiDoc As MODI.Document
    
    Set MiDoc = New MODI.Document
    
    'Open existing document image
    MiDoc.Create "C:\excel\temp\test.tif"
    
    'Attach document to viewer
    MiDocView1.Document = MiDoc
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top