+ Reply to Thread
Results 1 to 1 of 1

Open Word in Print Layout

  1. #1
    Registered User
    Join Date
    03-14-2016
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    13

    Open Word in Print Layout

    Hi folks, i'm trying to open a word doc from Excel as Read Only and apply Track changes (or TrackRevisions as it shows in vba) - I can do either action independently no problem but I cannot do both and it seems to be due to Word auto opening in 'Read Mode' so have been trying to find a way to open in Print mode from Excel but can't find anything.

    It will open the file in Read Only and then error at the with statement but if I choose print layout on document I can manually apply track changes no problem.

    The reason is that I do not want the main file(s) accidently amended so the ide is they can open the main file but then have to save a local copy with track changes which needs to be sent to another team for upload. The Read Only permission is applied on folder permissions anyway but there has been occasion where staff have been set up with read / write access accidently so id rather be able to do this.

    PHP Code: 
    Private Sub worksheet_Beforedoubleclick(ByVal Target As Rangecancel As Boolean)

    'On Error GoTo Error

    ParentDIR = Sheets("Dashboard").Range("F1") ' 
    Static - should never change
    DI 
    Cells(Target.RowTarget.Column 1)

    FileExt Application.WorksheetFunction.VLookup(DISheets("ParentDIRIndex").Range("A:B"), 2False)
    FileDIR ParentDIR DI "." FileExt

    Set wordapp 
    CreateObject("Word.Application")
    wordapp.Visible True
    wordapp
    .Activate

    Set wrddoc 
    wordapp.Documents.Open(FileDIR)  ',ReadOnly:=True
    wrddoc.Activate

    '
    ActiveWindow.View xlNormalView '' amends excel
    'ActiveWindow.View = wdPrintView


    With wrddoc
    .TrackRevisions = True
    .showrevisions = True
    End With


    Exit Sub

    Error:
    MsgBox Application.UserName & ", you have clicked an empty cell or the document that you have tried to open does not exist!", vbOKOnly, wrddoc 
    Last edited by Steelmyster; 05-10-2023 at 04:48 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel Macro to open and print word document
    By madhatter40 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2017, 01:26 PM
  2. Word Opens in DRAFT VIEW. How to open in PRINT LAYOUT view
    By Jenn68 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2017, 06:47 PM
  3. Macro that will open and print files(word, excel, pdf)
    By ILoveStMartin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-18-2014, 11:16 AM
  4. How can I have excel open & print hyperlinked Word.doc's ???
    By mattwatson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2013, 07:02 AM
  5. Use Excel VBA to open Word Doc in PRINT LAYOUT View
    By Marksman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-11-2012, 02:50 AM
  6. Excel string into Word for layout changes and Print
    By D_Rennie in forum Word Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2009, 06:22 PM
  7. Open Word then print
    By GuitarMyke in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-06-2008, 01:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1