PDA

View Full Version : Solved: License information... not found



pilgrim_153
02-14-2012, 11:53 AM
Hello.

I wonder if anyone can help me with this problem I have. I’m running Office 2011 for Mac and trying to open a Word Document from Excel. Having successfully bypassed the ActiveX problem by declaring and setting appwd as shown, I am now having a problem trying to open the Document. I’m getting the error message "License information for this component not found". Relevant pieces of code below.

Dim appwd As Object

txtpath = "Macintosh HD:Users:Alpha:Desktop:Misc:"
lettername = "TEMPLATE"

Set appwd = CreateObject("Word.Application")
appwd.Documents.Open txtpath & lettername

Thanks.

pilgrim_153
02-14-2012, 01:22 PM
I've just tried to repeat the text without the smiley but it seems to add it automatically when I type Alpha followed by colon followed by Desktop. It's a mystery!

frank_m
02-14-2012, 02:22 PM
I've just tried to repeat the text without the smiley but it seems to add it automatically when I type Alpha followed by colon followed by Desktop. It's a mystery!
Towards the bottom there should be a section called Additional Options where you can put a check next to Disable smilies in text.

If you don't see it there, try clicking the advanced option's button, then look again.

pilgrim_153
02-14-2012, 02:38 PM
Ok. I found it, thanks. The text should read Alpha:Desktop.

frank_m
02-14-2012, 02:53 PM
Edit: Fixed some mistakes I made when replacing the variable name's to match what you used.
"appwd" in a few places was supposed be "Word"
Edit#2 Because of the smilie face that had been there, needed correction to txtpath = "Macintosh HD:Users:Alpha:Desktop:Misc:"

I don't use a Mac but found this at http://www.mrexcel.com/forum/showthread.php?t=23060.
It may or may not offer you useful information.

Dim appwd As Object, txtpath As String, lettername As String
txtpath = "Macintosh HD:Users:Alpha:Desktop:Misc:"
lettername = "TEMPLATE"
Set appwd = CreateObject("Word.Application")
appwd.Visible = True
appwd.Documents.Open Filename:=txtpath & lettername & ".docx", ReadOnly:=True
With appwd
.Application.WindowState = wdWindowStateMaximize
.ActiveWindow.ActivePane.View.Zoom.Percentage = 100
End With
Set appwd = Nothing 'release from memory Also found this if you need to check to see if word is already open
Dim appwd As Object, wrdDoc As Object
Dim txtpath As String, lettername As String
txtpath = "Macintosh HD:Users:Alpha:Desktop:Misc:"
lettername = "TEMPLATE"
On Error Resume Next
Set appwd = GetObject(, "Word.application") 'gives error 429 if Word is not open
If Err = 429 Then
Set appwd = CreateObject("Word.application") 'creates a Word application
Err.Clear
End If
appwd.Visible = True
Set wrdDoc = appwd.Documents.Open(txtpath & lettername & ".docx")
Set appwd = Nothing I noticed that you didn't use a file extension such as .doc or .docx
Again I'm not a Mac person just noticed that in the two Mac examples I found with google, the extension is used

pilgrim_153
02-14-2012, 03:26 PM
frank_m.

Thank you so much. All I used out of the code was "Filename:=txtpath & lettername & ".docx", ReadOnly:=True" and now it opens the document every time. Now I can move on, but how thankful I am that help is at hand!

Thanks again.

frank_m
02-14-2012, 03:35 PM
Glad that worked out. -- (often those error messages are misleading)