Link to home
Start Free TrialLog in
Avatar of WFBweb
WFBwebFlag for Afghanistan

asked on

Open a OneNote 'file' while in Access?

I'm in design phase for a client who wants to use tablet pcs....with OneNote keeping client interview info.  While in an Access form can I open OneNote to notes kept for a particular client if I'm able to develop the filename in Access?  How?
Avatar of GRayL
GRayL
Flag of Canada image

You can use the shell command to open an application while in Access.  See VBA Help (Ctl-G or Alt-F11) and enter Shell Function in the Answer Wizard for details.
Maybe an invisible textbox on the form containing the Access developed filename and path and a command button when clicked to activate the shell command?
Avatar of WFBweb

ASKER

I copied the example from Shell help and modified:

Public Function testopenOneNote()
Dim RetVal
RetVal = Shell("C:\testfolder\Miscellaneous.one", 1)
End Function

Then I did a RunCode in a macro and got this error:
Runtime error '5' Invalid procedure call or argument
I also called it from a command button in a form and got the same result.
ASKER CERTIFIED SOLUTION
Avatar of stevbe
stevbe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of WFBweb

ASKER

Works great....wish I'd known about 'shell' a few years back...thanks.
Didn't I give you the answer?
Avatar of WFBweb

ASKER

I goofed....I didn't even look up...thought they were all from you.