Follow via:
RSS
Email Alert
Question
0 Votes
+ -

Word documents and templates from ip address

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.
Updated - 23rd Jan

Answers (1)

0 Votes
+ -
I doubt you can change this setting
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?
24th Jan

Replies

the DNS doesn't resolve fast enough because of the distance between offices and the slow internet. It often fails to resolve at all.
Slayer_ 24th Jan
But I am going to double check with them to see if that could be a solution.
Slayer_ 24th Jan
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.
Adrian Watts 25th Jan
That's a good idea, thanks. We'll try that as well.
Slayer_ 25th Jan
Answer the question
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.