Questions

Word documents and templates from ip address

+
0 Votes
Locked

Word documents and templates from ip address

Slayer_
I'm having an issue with Word security.

This line of code
wrd.Documents.Add Template:=strDestination, NewTemplate:=True, DocumentType:=wdNewBlankDocument, Visible:=True

Executed from a VB6 program errors when strDestination is an IP address UNC path. (example: "\\192.168.1.100\documents\code.dot")
Word won't let me add this as a safe zone, saying that IP addresses can't be safe.

Does anyone know how I can fix this? By code or setting in word or in Windows?

I am trying to search google but I am getting very bad search results so far.
I have already tried setting macro security to off but it didn't help.


Any help would be appreciated, thanks.
+
0 Votes
gechurch

It sounds like the document needs to be a Trusted Location (found in Word Options - Trust Center - Trusted Locations in modern versions of Word). I'm not surprised Word doesn't let you add IP addresses to Trusted Locations. The threat is that the IP address will change, or another PC on the network could be set to the same IP and then you will be loading potentially unsafe documents from an unknown host.

What is the reason you can't use a hostname instead of IP?

+
0 Votes
Slayer_

the DNS doesn't resolve fast enough because of the distance between offices and the slow internet. It often fails to resolve at all.

+
0 Votes
Slayer_

But I am going to double check with them to see if that could be a solution.

+
0 Votes
Adrian Watts

If dns is too slow and the ip address is not going to change then why not add the hostname and ip address to the hosts file of the host machines. Windows checks the hosts file before dns. You probably also want to make the destination server ip static and reserved.

+
0 Votes
Slayer_

That's a good idea, thanks. We'll try that as well.