Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Password protected document can't be merged

42 views
Skip to first unread message

Eddie

unread,
Jan 16, 2009, 1:32:01 PM1/16/09
to
Hello all, I have a user that is trying to email merge a password protected
document to 69 recipients but can't. If she removes the password protection
she dosen't have a problem, but she needs the doc protected from any editing.
Any suggestions on how she can accomplish sending out this document in a
protected format?

She is using office 2003

Thanks,
Eddie

JE McGimpsey

unread,
Jan 16, 2009, 4:46:32 PM1/16/09
to
In article <21C8AE1D-2490-450C...@microsoft.com>,
Eddie <Ed...@discussions.microsoft.com> wrote:

Since this is a newsgroup for Word for Macintosh (hence the ".mac." in
the newsgroup name), you'd probably do better in one of the WinWord
groups, e.g.:

microsoft.public.word.application.errors

Though there are a number of WinWord experts here, too.

If you post there, it may be helpful to specify how your user is trying
to do the email merge.

John McGhie

unread,
Jan 17, 2009, 5:08:31 AM1/17/09
to
Hi Eddie:

Hmmm.... The document that is sent out from a mail merge is a NEW document
that is a copy of the Main Document. So the password is never going to
carry through.

She would have to write a macro to perform the mail merge, then individually
set the password on the resulting documents before emailing.

She should also understand that a password does NOT protect a document from
"editing" if the recipient is determined. If they can read it, they can
change it. There is no such thing as a document that "cannot be changed" by
a determined recipient who can read it.

She may be better off to simply ask the recipients "please do not change
this document". If they want to do the right thing, they will leave it
alone. If they are determined to do bad things, there is no format that
will prevent them doing so. It's the old story of "Locks only keep out
honest people".

What she COULD do (only on a PC...) is "Digitally Sign" the document. That
won't "prevent" changes, but it will instantly reveal the fact that the
document has been changed.

Hope this helps

On 17/01/09 4:02 AM, in article
21C8AE1D-2490-450C...@microsoft.com, "Eddie"
<Ed...@discussions.microsoft.com> wrote:

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:jo...@mcghie.name

CyberTaz

unread,
Jan 17, 2009, 4:13:25 PM1/17/09
to
Hi John -

In order for the attachments to be created doesn't the original have to be
"opened" each time? If so it wouldn't be possible for the attachment to be
created since the doc couldn't be "read".

Regards |:>)
Bob Jones
[MVP] Office:Mac

On 1/17/09 5:08 AM, in article C597E437.1C49B%jo...@mcghie.name, "John

John McGhie

unread,
Jan 18, 2009, 3:58:11 AM1/18/09
to
Hi Bob:

Quite correct, you can't merge to a document that can't be opened. So you
would have to specify the password.

But if you were using VBA, you could specify the password to open in the
code.

My point was that the new document created won't have a password -- you
would need to open each of the output documents individually following the
merge and set it.

Cheers


On 18/01/09 6:43 AM, in article C597B425.48FE5%onlygen...@com.cast.net,
"Bob Jones" <onlygen...@com.cast.net> wrote:

--

Bearded

unread,
Jan 18, 2009, 4:40:13 AM1/18/09
to
Saving the doc as a pdf would render it "un-editable" for most users.
And changes would be obvious.

However, that assumes it is going to be an attachment in an Outlook
message for which the address list is a mailmerge.

If the idea is to produce a merged document - ie a single file
combining the p-word protected doc and other content, no can do.

I guess the way to look at is as series of tests:

IS THE PROTECTION from editing a legal / regulatory requirement?

If so, PDF is the best bet - in financial services, for example stock
market announcements, it's standard.

If it is simply a business issue – for example the sender wants to be
sure her info is not modified as it goes down the distribution chain -
the alternative could be to place it on a Sharepoint or other location
and email the intended recipients with a pointer or link, accompanied
by a strict warning, if necessary backed by the threat of sanctions.

Or does she want to copy-protect it? In other words prevent the legal
recipients from lifting all or part of it and onpassing, eg by email?

HTH

Ken


--
Writer / editor on London's River

Peter Jamieson

unread,
Jan 18, 2009, 7:40:02 AM1/18/09
to
Since it's Word 2003, assuming the e-mail client is Outlook 2003, the
following macro may be enough to meet the specified requirement. Other
clients such as Outlook Express cannot be automated in this way.

If the user is actually using Mac Word I know nothing about the
automatability of the e-mail clients is but assume that Applescripting
the whole thing might be workable in at least some cases.

Sub EmailOneDocPerSourceRecWithBody()
' By Peter Jamieson, 2006
Dim bOutlookStarted As Boolean
Dim bTerminateMerge As Boolean
Dim intSourceRecord As Integer
Dim objMailItem As Outlook.MailItem
Dim objMerge As Word.MailMerge
Dim objOutlook As Outlook.Application
Dim strMailSubject As String
Dim strMailTo As String
Dim strMailBody As String
Dim strOutputDocumentName As String

bOutlookStarted = False
bTerminateMerge = False

' Set up a reference to the
' ActiveDocument, partly because
' the ActiveDocument changes as you
' merge each record

Set objMerge = ActiveDocument.MailMerge

' Start Outlook as necessary

On Error Resume Next
Set objOutlook = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set objOutlook = CreateObject("Outlook.Application")
bOutlookStarted = True
End If

With objMerge

' If no data source has been defined,
' do it here using OpenDataSource.
' But if it is already defined in the
' document, you should not need to
' define it here.

' .OpenDataSource _
' Name:="whatever"

intSourceRecord = 1

Do Until bTerminateMerge
.DataSource.ActiveRecord = intSourceRecord

' if we have gone past the end
' (and possibly, if there are no records)
' then the Activerecord will not be what
' we have just tried to set it to

If .DataSource.ActiveRecord <> intSourceRecord Then
bTerminateMerge = True
' the record exists
Else

' while we are looking at the
' correct activerecord,
' create the mail subject, body and "to"
' Just some sample code here - replace it with
' whatever you need

strMailSubject = _
"Results for " & _
objMerge.DataSource.DataFields("Firstname") & _
" " & objMerge.DataSource.DataFields("Lastname")

strMailBody = _
"Dear " & objMerge.DataSource.DataFields("Firstname") & _
vbCrLf & _
"Please find attached a Word document containing" & vbCrLf & _
"your results for..." & vbCrLf & _
vbCrLf & _
"Yours" & vbCrLf & _
"Your name"
strMailTo = objMerge.DataSource.DataFields("Emailaddress")

' create the document path name
' In this case it can be the same for every recipient,
' but if you want to retain copies of the
' document, you can use info. in the data source

' this is an example - insert your
' own pathname here

strOutputDocumentName = "c:\a\results.doc"

' strOutputDocumentName = _
' "c:\mymergeletters\_" & _
' .DataSource.DataFields("Lastname").Value & _
' " letter.doc"
.DataSource.FirstRecord = intSourceRecord
.DataSource.LastRecord = intSourceRecord
.Destination = wdSendToNewDocument
.Execute

' The Activedocument is always the
' output document

' Add any parameters you need to these calls,
' e.g. here we want to password protect it. This bit is
' untested, and you may need more
ActiveDocument.SaveAs strOutputDocumentName, _
Password:="readpassword", _
WritePassword:="writepassword"
ActiveDocument.Close

' Now create an Outlook Mail Item

Set objMailItem = objOutlook.CreateItem(olMailItem)
With objMailItem
.Subject = strMailSubject
.Body = strMailBody
.To = strMailTo
.Attachments.Add strOutputDocumentName, olByValue, 1
'.Save
.Send
End With
Set objMailItem = Nothing

intSourceRecord = intSourceRecord + 1
End If
Loop
End With

' Close Outlook if appropriate

If bOutlookStarted Then
objOutlook.Quit
End If

Set objOutlook = Nothing
Set objMerge = Nothing

End Sub

Peter Jamieson

http://tips.pjmsn.me.uk

John McGhie

unread,
Jan 19, 2009, 4:59:48 AM1/19/09
to
Hi Ken:

On 18/01/09 7:10 PM, in article 2009011809...@news.giganews.com,
"Bearded" <Bearded> wrote:

> Saving the doc as a pdf would render it "un-editable" for most users.
> And changes would be obvious.

Not on a Mac (this is a Mac Word group!). Something like half of all Macs
have the ability to edit PDF. And any PC can acquire the ability for free
in a couple of clicks of the web browser :-)

The changes to prices in a quote can be very subtle :-)

Cheers

0 new messages