cancel
Showing results for 
Search instead for 
Did you mean: 

Open a Document in MEGA through a Macro

Solved
Highlighted

Open a Document in MEGA through a Macro

Hi everybody,

I've created a MetaCommand which creates a document.

I'd like to open it (like with a double-click), but I could not find any clue on the articles.

 

Can anybody give me a hint?

 

 

Set oDoc = oMyProcess.NewDocument(oModDoc.GetProp("~210000000900[Name]"))
	If oDoc.refreshdocument = 0 Then
		'Open oDoc	
	End If

 

 

Tags (4)
3 Replies
MEGA

Re: Open a Document in MEGA through a Macro

Hi Martino

 

There is no method available to open an document in API script

It is possible to

  • Create a document (CreateDocument)
  • Initialize a document (InitializeDocument)
  • Detach a document (DetachDocument)
  • Refresh a document (RefreshDocument)

 

 

 

Jerome

Re: Open a Document in MEGA through a Macro

Ok,I'll explore the document and they'll open it by double click.

 

Thank you!

Contributor

Re: Open a Document in MEGA through a Macro

Hi,

 

If you are generating a word document, you can load the word application, get the path of document and automatically open it in word. No need to explore it

 

Something like this:

Set oDoc = oMyProcess.NewDocument(oModDoc.GetProp("~210000000900[Nom]"))
    If oDoc.refreshdocument = 0 Then
       Set objWord = CreateObject("Word.Application")
       objWord.Documents.Open(oDoc.GetProp("_Mdb_DocFilePath") & "\" & oDoc.GetProp("Nom"))
       objWord.Visible = True
       Set objWord = Nothing  
    End If

 

Regards,

Stephane