Office Open XML Format?

User avatar
sobershea
2StarLounger
Posts: 184
Joined: 08 Feb 2010, 23:37
Location: Howell, Michigan USA

Office Open XML Format?

Post by sobershea »

I installed Office 2007 and when I saved the first document created in Office 2003 I got the following message:

"This document is both encrypted and password protected. The Office Open XML Formats available in the 2007 release provide stronger encryption. Do you want to increase the security of this document by converting to an Office Open XML Format?"

If I select "Yes" will it actually (visually or otherwise) change the format of the document? Will my macros still work? Will I still need a password?

TIA
Sherry

User avatar
HansV
Administrator
Posts: 78485
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Office Open XML Format?

Post by HansV »

If you select Yes, you'll be given the chance to save it the document in an Office 2007 format. If the document contains macros, you must use the macro-enabled variant (.docm for Word, .xlsm for Excel, .pptm for PowerPoint), not the "standard" variant (.docx, .xlsx and .pptx, respectively). This guarantees that the macros will be saved in the document.
You will still need the password to open the document.
Best wishes,
Hans

User avatar
sobershea
2StarLounger
Posts: 184
Joined: 08 Feb 2010, 23:37
Location: Howell, Michigan USA

Re: Office Open XML Format?

Post by sobershea »

Got it. Thanks Hans.
Sherry

User avatar
sobershea
2StarLounger
Posts: 184
Joined: 08 Feb 2010, 23:37
Location: Howell, Michigan USA

Re: Office Open XML Format?

Post by sobershea »

HansV wrote:If you select Yes, you'll be given the chance to save it the document in an Office 2007 format. If the document contains macros, you must use the macro-enabled variant (.docm for Word, .xlsm for Excel, .pptm for PowerPoint), not the "standard" variant (.docx, .xlsx and .pptx, respectively). This guarantees that the macros will be saved in the document.
You will still need the password to open the document.
I tried saving my docs with the appropriate variant and while most of my macros seem to work in Excel, I cannot get the one Word macro that I use to work. You helped me with this macro before and it DOES know when to turn on/off the Document Map but it doesn't know to go to the last position I was at. This is the macro:

Code: Select all

Sub AutoOpen()
If ActiveDocument.Name = "WIN7 Notes.docm" Then
ActiveDocument.ActiveWindow.DocumentMap = True
Else
ActiveDocument.ActiveWindow.DocumentMap = False
End If
Application.GoBack
End Sub
I am researching this but so far haven't found an answer.
TIA
Sherry

User avatar
HansV
Administrator
Posts: 78485
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Office Open XML Format?

Post by HansV »

Unfortunately, this won't work anymore with documents using a Word 2007 format. The Application.GoBack method uses a hidden bookmark "\PrevSel1". This used to be stored in the document, but that doesn't happen in .docx / .docm documents. :sad:
Best wishes,
Hans

User avatar
sobershea
2StarLounger
Posts: 184
Joined: 08 Feb 2010, 23:37
Location: Howell, Michigan USA

Re: Office Open XML Format?

Post by sobershea »

It's too bad that MSoft thought we didn't care where we left off. What were they thinking? :scratch: I did find a set of macros that are supposed to do the same thing as GoBack at this site and at this site but I can't seem to make either of them work. No matter what, Word just opens at the top of the document. :hairout: C'est la vie.
Sherry

User avatar
HansV
Administrator
Posts: 78485
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Office Open XML Format?

Post by HansV »

The code in the second link has a problem: it uses curly quotes instead of straight quotes; VBA doesn't recognize curly quotes. If I replace all quotes in the code with straight quotes (Shift+'), it sort of works for me, but not perfectly. I don't think it's worth bothering with - I'd live with it as it is.
Best wishes,
Hans

User avatar
sobershea
2StarLounger
Posts: 184
Joined: 08 Feb 2010, 23:37
Location: Howell, Michigan USA

Re: Office Open XML Format?

Post by sobershea »

You are correct about the curly quotes - I didn't catch that. After I changed them the macro works, but like you said, sort of. Mostly, there is this pregnant pause before the blinking cursor "shows" you what line you were on. Other than that, it seems to work OK. Not sure if I will keep it or just deal with the default as you suggest. Maybe I will leave the macro enabled for now and see how bothersome it is - or what other problems it causes. :smile:

Thanks Hans,
Sherry