Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-18-2016, 12:22 PM
Sven62 Sven62 is offline Make read only and being to top Windows 7 64bit Make read only and being to top Office 2010 32bit
Novice
Make read only and being to top
 
Join Date: Nov 2016
Posts: 4
Sven62 is on a distinguished road
Default Make read only and being to top


The code below opens the file as read only.

How can I make it also bring that Word doc to the top? Right now it opens behind the excel file where my form button resides.

Code:
Sub OpenWord() 
    Dim WordApp As Object 
    Dim WordDoc As Object 
     
    Set WordApp = CreateObject("Word.Application") 
    Set WordDoc = WordApp.Documents.Open(Filename:="C:\test\test.doc", ReadOnly:=True) 
    WordApp.Visible = True 
     
     'do your stuff
     
    Set WordDoc = Nothing 
    Set WordApp = Nothing 
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook sending Not Read receipt when read receipts are disabled abrown1983 Outlook 1 07-16-2021 04:33 AM
Make read only and being to top Ifcontains "yes" make A1, B1 , C1 record read only alpha2nl Excel Programming 5 11-08-2016 04:42 AM
Make read only and being to top Automatically enter date into a column and make that column read only Mr Davo Excel 1 10-29-2012 01:07 AM
Is it possible to make Word link to the last record in Excel stephen_pen Word 0 09-22-2011 11:00 PM
Make read only and being to top marking email as "read" until email is read on local device. mwomack Outlook 2 07-16-2011 08:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft