Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2016, 05:25 AM
anderjoa anderjoa is offline Zoom, Unprotect-error in 2016 Windows 7 64bit Zoom, Unprotect-error in 2016 Office 2016
Novice
Zoom, Unprotect-error in 2016
 
Join Date: Oct 2016
Posts: 6
anderjoa is on a distinguished road
Question Zoom, Unprotect-error in 2016

We have a PowerBuilder-application that opens document in Word.


With Office 2007 the following works for example:

Activedocument.ActiveWindow.ActivePane.View.Zoom.P ercentage = WORD_ZOOM_PERCENTAGE

.ActiveDocument.unProtect()

I am now testing Office 2016 and receive errors. I have looked at the Object Model and I don't see that anything has changed.

Any ideas?
Reply With Quote
  #2  
Old 10-17-2016, 04:16 PM
Guessed's Avatar
Guessed Guessed is offline Zoom, Unprotect-error in 2016 Windows 10 Zoom, Unprotect-error in 2016 Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Does this help?
http://stackoverflow.com/questions/3...of-application
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 10-17-2016, 11:38 PM
anderjoa anderjoa is offline Zoom, Unprotect-error in 2016 Windows 7 64bit Zoom, Unprotect-error in 2016 Office 2016
Novice
Zoom, Unprotect-error in 2016
 
Join Date: Oct 2016
Posts: 6
anderjoa is on a distinguished road
Default

I'm not testing 2007 but 2016.
2007 runs ok.
Reply With Quote
  #4  
Old 10-18-2016, 05:39 AM
Cosmo Cosmo is offline Zoom, Unprotect-error in 2016 Windows Vista Zoom, Unprotect-error in 2016 Office 2007
Competent Performer
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

I remember having a similar problem a while ago, not sure what it was that fixed it, but try adding this code before the 'Unprotect'

Quote:
If Activedocument.ActiveWindow.View.SplitSpecial = wdPaneNone Then
Activedocument.ActiveWindow.ActivePane.View.Type = wdPrintView
Else
Activedocument.ActiveWindow.View.Type = wdPrintView
End If
Reply With Quote
  #5  
Old 10-18-2016, 07:52 AM
anderjoa anderjoa is offline Zoom, Unprotect-error in 2016 Windows 7 64bit Zoom, Unprotect-error in 2016 Office 2016
Novice
Zoom, Unprotect-error in 2016
 
Join Date: Oct 2016
Posts: 6
anderjoa is on a distinguished road
Default

Thanks a lot! This helps!

Activedocument.ActiveWindow.ActivePane.View.Type = wdPrintView
Activedocument.ActiveWindow.View.Type = wdPrintView
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Onenote 2016 is not syncing - Error code: 0x2 clumps19 OneNote 0 08-15-2016 05:09 PM
Unprotect Cells Cardinal2 Excel Programming 2 01-06-2015 05:15 PM
ADD in That can unprotect the documents. aligahk06 Word 0 07-12-2010 04:55 AM
Unprotect header in Word Fran Word 0 12-23-2008 03:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:48 AM.


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